@xinix/migrate
v1.1.0
Published
Migration cli
Downloads
30
Readme
@xinix/migrate
npm i @xinix/migrate
Create a migration file inside migrations
directory of your project.
module.exports = {
async up (ctx) {
// do something async here
}
async down (ctx) {
// do something async here
}
};
Configuration
Create file with name .migraterc.js
and export umzug options. Example,
module.exports = {
storage: new require('@xinix/migrate/storages/norm')({ manager }),
};
Migration files will be sorted by its name.
Status
Show current status of migration.
migrate status
Up
Migrate up to the latest state.
migrate up
Down
Migrate down to earliest state.
migrate down
Next
Migrate to next state.
migrate next
Prev
Migrate to previous state.
migrate prev