GithubHelp home page GithubHelp logo

dalthviz / nmig Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anatolyuss/nmig

0.0 3.0 0.0 578 KB

NMIG is a database migration tool, written in Node.js and highly inspired by FromMySqlToPostgreSql.

License: GNU General Public License v3.0

TypeScript 94.95% JavaScript 5.05%

nmig's Introduction

NMIG - the database migration tool.

WHAT IS IT ALL ABOUT?

NMIG is an app, intended to make a process of migration from MySQL to PostgreSQL as easy and smooth as possible.

KEY FEATURES

  • Precise migration of the database structure - NMIG converts MySQL data types to corresponding PostgreSQL data types, creates constraints, indexes, primary and foreign keys exactly as they were before migration.
  • Ability to rename tables and columns during migration.
  • Ability to recover migration process if disaster took place (without restarting from the beginning).
  • Ability to migrate big databases - in order to eliminate "process out of memory" issues NMIG will split each table's data into several chunks.
    Each group of chunks will be loaded via separate worker process.
  • Speed of data transfer - in order to migrate data fast NMIG uses PostgreSQL COPY protocol.
  • Ease of monitoring - NMIG will provide detailed output about every step, it takes during the execution.
  • Ease of configuration - all the parameters required for migration should be put in one single JSON document.

SYSTEM REQUIREMENTS

  • Node.js 8 or higher

USAGE

1. Create a new PostgreSQL database.
Sample:  CREATE DATABASE my_postgresql_database;
If you are planning to migrate spatial data (geometry type columns), then PostGIS should be installed and enabled.

2. Download Nmig package and put it on the machine running your PostgreSQL (not mandatory, but preferably).
Sample: /path/to/nmig

3. Edit configuration file located at /path/to/nmig/config/config.json with correct details.

Notes:

4. Go to Nmig directory, install dependencies, compile and run the app
    Sample:

$ cd /path/to/nmig

$ npm install

$ npm run build

$ npm start

5. If a disaster took place during migration (for what ever reason) - simply restart the process $ npm start
    NMIG will restart from the point it was stopped at.

6. At the end of migration check log files, if necessary.
    Log files will be located under "logs_directory" folder in the root of the package.
    Note: "logs_directory" will be created during script execution.

7. In case of any remarks, misunderstandings or errors during migration,
    please feel free to email me [email protected]

RUNNING TESTS

1. Create a new PostgreSQL database.
Sample:  CREATE DATABASE nmig_test_db;

2. Download Nmig package.
Sample: /path/to/nmig

3. Edit configuration file located at /path/to/nmig/config/test_config.json with correct details.

Notes:

4. Go to nmig directory, install dependencies, compile and run tests
    Sample:

$ cd /path/to/nmig

$ npm install

$ npm run build

$ npm test

5. At the end of migration check log files, if necessary.
    Log files will be located under "logs_directory" folder in the root of the package.
    Note: "logs_directory" will be created during script execution.

VERSION

Current version is 4.0.0
(major version . improvements . bug fixes)

KNOWN ISSUES

  • Empty strings in char/varchar columns may be interpreted as NULL.

LICENSE

NMIG is available under "GNU GENERAL PUBLIC LICENSE" (v. 3)
http://www.gnu.org/licenses/gpl.txt.

nmig's People

Contributors

anatolyuss avatar lsei avatar fjfalcon avatar moominpappa avatar

Watchers

James Cloos avatar Daniel Althviz Moré avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.