Skip to content

Instantly share code, notes, and snippets.

@slvnperron
Last active March 3, 2017 16:26
Show Gist options
  • Save slvnperron/9a3027f4d798c7d6b6b6a9b9b6bdfa7b to your computer and use it in GitHub Desktop.
Save slvnperron/9a3027f4d798c7d6b6b6a9b9b6bdfa7b to your computer and use it in GitHub Desktop.
Migrating to Botpress 0.1

Migrating to Botpress Beta 0.1

This will guide will help you to migrate your existing bots from Botpress v0.0 to v0.1.

Before you migrate

The following database tables will be lost:

  • botpress-analytics: all analytics
  • botpress-subscription: all subscriptions
  • botpress-schedulers: all schedules (past & next)
  • botpress-hitl: all messages and sessions
  • botpress-broadcast: all scheduled broadcasts and previous broadcasts history

All modules configuration will be lost.

We strongly recommend that you backup your bot and all of its files before you migrate to 0.1. If you wish to keep your database tables, you should back them up manually.

Why am I losing my data?

Botpress is still in beta and we're still changing APIs while we can. In this release, we changed how the data was persisted to the database and the format of this data.

We wrote a migration for the users database table because we believe it is the only mission critical table that people would really want to preserve. The other tables can still be migrated, you just have to migrate them yourself.

Steps

  1. Backup your bot, including the ./data and ./modules_config directories
  2. Update botpress to 0.1: npm install -S botpress
  3. (optional) Update your global botpress: npm install -g botpress
  4. Update all your modules manually: botpress install module_name
  5. In a terminal inside your bot directory, run: DELETE_TABLES=true botpress migrate 0.0
  6. Reconfigure every modules manually

What's new in Botpress 0.1

  • Added support for Postgres (version 5.5+)
  • Built-in convenience Key-Value-Store (persisted to database)
  • Themeable UI
  • Guided tour for new bots
  • Modules configuration persisted to database
  • Configuration is overridable in botfile
  • A migration CLI tool
  • Support for Async/Await operators
  • Modules can provide custom icons
  • Many bug fixes and improvements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment