1.0.3 • Published 2 years ago

@forhot2000/ts-migrate v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

ts-migrate

installation

npm install @forhot2000/ts-migrate

configuration

provide enviromnent variables in .env file, like:

MYSQL_HOST=localhost
MYSQL_USER=user
MYSQL_PWD=password
MYSQL_DB=database

usage

generate new migration file

npx ts-migrate generate <table> <name>

migrate all migrations to database

npx ts-migrate migrate

undo last one migration

npx ts-migrate undo

undo all migrations

npx ts-migrate undo-all