Data migration with the nmig tool

Installation

git clone https://github.com/AnatolyUss/nmig.git 
cd nmig
git checkout v5.5.0

Configuration

nano config/config.json
"source": {
"host": "localhost",
"port": 3306,
"database": "test_db",
"charset": "utf8mb4",
"supportBigNumbers": true,
"user": "root",
"password": "0123456789"
}
"target": {
"host" : "localhost",
"port" : 5432,
"database" : "test_db",
"charset" : "UTF8",
"user" : "postgres",
"password" : "0123456789"
}
"enable_extra_config" : false
nano config/extra_config.json
"tables" : [
{
"name": {
"original": "salary",
"new": "renamed_salary"
},
"columns": [
{
"original": "id",
"new": "renamed_id"
},
{
"original": "employee_id",
"new": "renamed_employee_id"
}
]
},
{
"name": {
"original": "contract",
"new": "renamed_contract"
},
"columns": [
{
"original": "id",
"new": "renamed_id"
}
]
}
]

Usage

npm install 
npm run build
npm start

--

--

--

Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Developing assistive technologies as apps: the encounter of two technological systems (2)

Meet MyAppCost to estimate your application software development cost

How to Configure Nginx High Availability Cluster Using Pacemaker on Ubuntu 16.04

Key Metrics to Track in DevOps (Part 1)

How To Stay Ready for Technical Interviews

Meeting. Person writing on a whiteboard.

In EVE-NG vPC peer-link configureren. Super cool dat je gewoon eerst alles op je laptop kan testen.

The problem with sharding

Spiderman to Sinatra

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrey Karazhev

Andrey Karazhev

Software Engineer

More from Medium

Filtering expired items DynamoDB TTL implementation

Viafoura Conversations — Making Custom User Badges using Python

NGINX: How does split_client works?

Circle CI while waiting for ADO