@bappo/migration-cli
v0.0.6
Published
The command line tool for bappo db migration
Downloads
21
Keywords
Readme
Bappo migration
Installation
npm install -g @bappo/migration-cli
Supported dbs
Currently only works with mongo. Use sequelize-cli instead for postgres.
Usage
Make sure you are in the migrations folder
Generate a migration
bappo-migrate generate <migration_name>
This creates a migration script folder with name
{timestamp}_{migration_name}
in the migrations folder.Write upgrade script
up.js
in the newly created migration script folderComplete test file
up.spec.js
in the newly created migration script folderMake sure tests pass
bappo-migrate test-upgrade <migration_name_with_timestamp>
Run upgrade
bappo-migrate upgrade <migration_name_with_timestamp>