@bappo/migration-cli
v0.0.6
Published
The command line tool for bappo db migration
Downloads
22
Keywords
Readme
Bappo migration
Installation
npm install -g @bappo/migration-cliSupported 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.jsin the newly created migration script folderComplete test file
up.spec.jsin 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>
