0.4.2 • Published 6 years ago

ter-data-migration v0.4.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

ThreeEyedRaven91's ter-data-migration

A cool tools for migrate data from a database (maybe staging or development environment) to other database (production or staging)

You will never miss anything again.

How to use

Installation

npm install -g ter-data-migration

# or

yarn global add ter-data-migration

Config

Create .tdm_config folder

mkdir .tdm_config
cd .tdm_config

Create profile.json file

{
    "profiles": {
        "development": {
            "database": "your_database",
            "user": "your_user",
            "password": "your_password",
            "dialect": "mysql or something else",
            "host": "your_mysql_host"
        },
        "staging": {
            "database": "your_database",
            "user": "your_user",
            "password": "your_password",
            "dialect": "mysql or something else",
            "host": "your_mysql_host"
        }
    },
    "default": "development"
}

Run

# backup

ter-data-migration backup
ter-data-migration backup --source=development

# restore

ter-data-migration restore
ter-data-migration restore --target=staging

# migrate

ter-data-migration migrate --source=development --target=staging

# help

ter-data-migration --help

Options

OptionShortMeaningExample
source-sDefine source environment (not working with restore)ter-data-migration backup --source=development
target-tDefine target environment (not working with backup)ter-data-migration restore --target=development
include-iOnly backup / restore with following tablester-data-migration backup --include=Users,Projects
exclude-eExclude tables backup / restore. Not working if include appearter-data-migration backup --exclude=Logs,PasswordReset

See result

Everything in your db is exported with ${table_name}.json

Roadmap

VersionFunctionStatus
0.1.xRead from profile (with default config) and run export to jsonDone
0.2.xRead from profile (with default config) and restore from jsonDone
0.3.xAdd params profile, allow include or exclude tablesDone
0.4.xAdd params from, to and migration from profile to profileDone
0.5.xAdd scenario fileTo do
0.6.xProvide API to programmatically migration, backup, restoreTo do
0.7.xProvide init command allow create profile.jsonTo do
0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago