1.0.11 • Published 6 years ago

mygrator v1.0.11

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Mygrator

Mygrator is console tool for working with mysql migrations in node.js based projects. It's written for node 8+ and depends on mysql package.

Features:

  • Config in files
  • Migrations are stored in sql files
  • Before applying each migration whole DB backup is done
  • You can restore backuped DB versions in one line
  • If version is placed in migration filename mygrator can resolve versioninf in auto mode. Or you can manually list them in config
  • Backup and restore are based on mysqldump and mysql. They work really fast

Warning: It's a very young project. No tests and warranties are provided with it. I will be really pleased for any PR and help.

Start

npm i -g mygrator

Create config template in working dir

mygrator setup

config is shipped with comments

List all migrations available

mygrator list all

List new migrations

mygrator list new

Upgrade DB to latest migration

mygrator upgrade

Upgrade DB to specific version

mygrator upgrade 1
# put your version number instead 1

Backup current DB

mygrator backup

Show info about current version

mygrator info

Restore specific version

mygrator restore 1
1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago