Data Migrations
Learn how to update your database data through migrations.
On occasion, Novu may introduce features that require changes to the database schema or data. This usually happens when a feature has a hard dependency on some data being available on a database entity. You can use migrations to make these changes to your database.
Running Migrations
To run data migrations, enter the following sequence of commands in your terminal from the novuhq/novu
repository root:
Some features may have multiple migrations, in which case you will need to run each migration in the order shown below.
Migrations History
Below you will find a list of migrations introduced in previous versions of Novu, alongside the migration path to use in the script above.
In some cases, it’s necessary for Novu to remodel the data access layer to improve application performance as new data access patterns emerge. It is therefore important that each migration at the specified release tag commit is performed sequentially during version upgrades to ensure the necessary application code is available for the migration to succeed.
Version | Feature | Migration Path(s) |
---|---|---|
v2.1 | Preference centralization | ./preference-centralization/preference-centralization-migration.ts |
v0.23 | API keys encryption | ./encrypt-api-keys/encrypt-api-keys-migration.ts |
v0.18 | Multi-Provider | ./integration-scheme-update/add-primary-priority-migration.ts ./integration-scheme-update/add-integration-identifier-migration.ts |
Integration Store | ./novu-integrations/novu-integrations.migration.ts | |
v0.16 | In-App Integration | ./in-app-integration/in-app-integration.migration.ts |
Secure Flag Fix | ./secure-to-boolean/secure-to-boolean-migration.ts | |
v0.15 | Database TTL | ./expire-at/expire-at.migration.ts |
v0.12 | Organization Invite Fix | ./normalize-users-email/normalize-users-email.migration.ts |
v0.9 | Seen/Read Support | ./seen-read-support/seen-read-support.migration.ts |
v0.8 | Secure Credentials | ./fcm-credentials/fcm-credentials-migration.ts ./encrypt-credentials/encrypt-credentials-migration.ts |
v0.4 | Change Promotion | ./changes-migration.ts |
Was this page helpful?