Skip to content

Migration

ankitpws edited this page Sep 21, 2022 · 9 revisions

What is migration?

Migration is a process in which we can add some data to the Database or design schema of DB setting indexes etc. These are scripts that run before starting the application. It can be also used for migrating one DB to another DB.

Where do we have to create Migrations?

Migrations are needed when an application needs some pre-loaded data for getting started. In Elevate services we need email templates, forms, and entities. This data is added to DB via migration which will be utilized by the frontend app. Migrations are created inside of the migration folder.

Commands for Migration in Elevate.

To create a migration file.

npm run elevate-migrations create migration-file-name

To check migration status

npm run elevate-migrations status

To run migration

npm run elevate-migrations up

To revert migration

npm run elevate-migrations down

Clone this wiki locally