ts-node-migrate
v0.2.0
Published
Database migration tool written in typescript
Downloads
270
Maintainers
Readme
ts-node-migrate
A generic typescript database migration cli for potentially multiple databases supported
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