We can use yarn
or npm
to run migrations scripts
All the migrations are stored under /migrations
folder.
To make a migration run ,
yarn migrate:create <fileName>
Eg :
yarn migrate:create create-user-table
node ./node_modules/db-migrate/bin/db-migrate create <fileName> --config config/index.js -e db --sql-file
All the Migrations are stored under /migrations
folder.
To run all the migrations run,
yarn run migrate:up
All the Migrations are stored under /migrations
folder.
To rollback a particular migration run,
yarn run migrate:down