Data Migrations
Learn how to update your database data through migrations.
Occasionally, Impler might add features that call for data or database schema alterations. This typically occurs when a feature requires certain data to be present on a database entity to function. To make these modifications to your database, you can utilize migrations.
Running Migrations
To run data migrations, enter the following sequence of commands in your terminal from the impler/api
repository root:
npm run setup:project
cd apps/api
npm run migration -- ./src/migrations/<MIGRATION_PATH>.ts
# e.g. npm run migration -- ./src/migrations/update-date-formats/update-date-formats.migration.ts
Certain features can require more than one migration; in that case, you must do each migration in the following order.
Migrations History
Below you will find a list of migrations introduced in previous versions of Impler, alongside the migration path to use in the script above.
Revision of template files according to new structure
./src/migrations/regenerate-templates/regenerate-templates.migration.ts
0.24.0
Verify user email using verification code
./src/migrations/verify-user/verify-user.migration.ts
0.27.0
Migrate users for teams support
./src/migrations/shift-environment-key/shift-environment-key.migration.ts
If you have any questions, suggestions, or comments. Feel free to reach out to us over Discord. We’re constantly improving to deliver the best Data Importer for your product, and we value your input.
Last updated
Was this helpful?