ts-node-migrate
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

ts-node-migrate

A generic typescript database migration cli for potentially multiple databases supported

npm type definitions GitHub last commit

Support databases:

  • Mongodb
  • Mysql (TBD)

Installation

npm i -g ts-node
npm i ts-node-migrate

Usage:

Before using the cli, setup environment variables below

TSNM_URL=mongodb://localhost:27017/test
TSNM_DB_TYPE=mongodb
TSNM_DIR=migrations
TSNM_TABLE_NAME=changelog

You can setup package.json scripts or run cli directly if installed globally

tsnm [options] [command]

Options:
  -h, --help      display help for command

Commands:
  new             Creates new migration template
  status          Verify migration status (default)
  up              Doing migration forward
  down            Doing migration backward
  help [command]  display help for command

Package Sidebar

Install

npm i ts-node-migrate

Weekly Downloads

152

Version

0.2.0

License

MIT

Unpacked Size

88.8 kB

Total Files

98

Last publish

Collaborators

  • khaind