Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Latest commit

 

History

History
25 lines (16 loc) · 1.47 KB

File metadata and controls

25 lines (16 loc) · 1.47 KB

Database Migration

As features are added to Rocket.Chat, the database schema may change between versions.

Database migration means updating an older schema to a newer one (or vice versa). When you incrementally update your Rocket.Chat version, the database migration is automatic, and you do not have to take any explicit action. Rocket.Chat migrations and thier versions can be found on GitHub.

We use migrations to force an updatable version range. It means you cannot upgrade from version three to five because the migrations in between are removed.

{% hint style="info" %} Rocket.Chat cannot be officially downgraded due to database migrations. However, you can manually roll back migrations separately. {% endhint %}

Migration Collection

A migration collection has only one document with the following structure:

{"_id": "control","locked":false, "version":19}
  • _id : The value is always control. It means the collection has only one document to control migration actions.
  • locked : The value is boolean and can either be true or false. It identifies whether migration is currently happening or not. If a migration fails, it will be stuck at true.
  • version - The migration version your server is currently at.

To skip a migration, set the version field in the migration collection to the next version of the one you want to skip.