steedos-platform/packages/migrate
github-actions d6a9c8128f v2.1.78
2022-01-27 10:08:59 +00:00
..
migrations
db.js
index.js
package.json v2.1.78 2022-01-27 10:08:59 +00:00
README.md package 加下 README.md #2344 2021-10-21 14:24:24 +08:00
steedos-config.yml

Steedos Migration Scripts

Migrate steedos database with node-migrate.

Usage

DB Connection

set database connection in steedos-config.yml

Migrate up

open nodejs console.

var migrate = require("@steedos/migrate");
migrate.up();

Migrate down

open nodejs console.

var migrate = require("@steedos/migrate");
migrate.down();

Enable auto migrate for steedos

steedos-config.yml

datasources:
  default:
    auto_migrate: true

Add migration script

yarn migrate create :script_name

功能说明

  • 此包用于执行升级脚本文件