Data Migrations

Learn how to update your database data through migrations.

Occasionally, Impler might add features that call for alterations to the data or database schema. 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'll need to 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.

Have any doubts? Shoot us a message directly on Discord.

Last updated