-
Notifications
You must be signed in to change notification settings - Fork 3
Database Migrations
Katie Broida edited this page Dec 20, 2019
·
2 revisions
yarn create-migration <migration name>
# Example
yarn create-migration create-users-table
db-migrate tool will subsequently create a JS migration file that can be edited in the migrations
folder.
yarn db-migrate-up
This command can be customized with the following options: https://db-migrate.readthedocs.io/en/latest/Getting%20Started/usage/#running-migrations
Example:
Passing a count: npm run db-migrate-down -- -c 1
yarn db-migrate-down
This command can be customized with the following options https://db-migrate.readthedocs.io/en/latest/Getting%20Started/commands/#down