1.1.0 • Published 4 years ago
@xinix/migrate v1.1.0
@xinix/migrate
npm i @xinix/migrateCreate 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 statusUp
Migrate up to the latest state.
migrate upDown
Migrate down to earliest state.
migrate downNext
Migrate to next state.
migrate nextPrev
Migrate to previous state.
migrate prev