@steedos/migrate

2.7.12 • Public • Published

Steedos Migration Scripts

Migrate steedos database with node-migrate.

Usage

DB Connection

项目根目录下执行 node 进入node控制台

在node控制台执行 require('dotenv-flow').config(); 目的是为了读取.env.local设置 process.env.MONGO_URL

Migrate up

open nodejs console.

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

Migrate down

open nodejs console.

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

Default auto migrate for steedos

config STEEDOS_DB_AUTO_MIGRATE=false in .env.local to disable auto migrate

Add migration script

yarn migrate create :script_name

功能说明

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

Dependents (1)

Package Sidebar

Install

npm i @steedos/migrate

Weekly Downloads

2,859

Version

2.7.12

License

MIT

Unpacked Size

60.5 kB

Total Files

17

Last publish

Collaborators

  • steedos-zhuangjianguo
  • steedos-baozhoutao
  • chenzhipei
  • yinlianghui
  • steedos-sunhaolin