@xinix/migrate
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @xinix/migrate

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

30.4 kB

Total Files

19

Last publish

Collaborators

  • reekoheek
  • januar.siregar