Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 749 Bytes

migrations.md

File metadata and controls

18 lines (15 loc) · 749 Bytes

Migrations

Migrating is controlled with two scripts:

  • yarn migrate up that runs all not yet executed migrations
  • yarn migrate down that rollbacks the last 1 executed migration.

New Migration

  1. First, run yarn migrate create <migration name>.
  2. node-pg-migrate will produce migration file prefixed with current timestamp according to config/migration-template.ts template.
  3. Queries under the up property are executed when migrating up, queries under the down property are executed when migrating down and should therefore perform reverse operations.

Previous Page Next Page
Application Setup Localization