Migrating is controlled with two scripts:
yarn migrate up
that runs all not yet executed migrationsyarn migrate down
that rollbacks the last 1 executed migration.
- First, run
yarn migrate create <migration name>
. node-pg-migrate
will produce migration file prefixed with current timestamp according toconfig/migration-template.ts
template.- Queries under the
up
property are executed when migrating up, queries under thedown
property are executed when migrating down and should therefore perform reverse operations.
Previous Page | Next Page |
---|---|
Application Setup | Localization |