mihailShumilov/mysql2postgresql

Convert MySQL XML dumps into PostgreSQL schema + data SQL.

PHP

315

63 commits

updated Jan 30, 2020

See the code

README

mysql2postgresql

Converter mysql schema and data to postgresql

Usage

  1. Create dump in xml format using command: mysqldump --xml -u USER_NAME DB_NAME > DUMP_FILE_NAME
  2. Run converter using command: php convertor.php -i DUMP_FILE_NAME -o PSQL_FILE_NAME

Additional options

  • -b50 - set batch count (used on insert data). By default batch count = 200
  • -n - non export structure

Restriction

This converter does not support foreign keys, because mysql does not return foreign key in xml dump Also You must have installed locally php postgresql extension

converter
database
migration
mysql
php
postgresql

Contributors

mihailShumilov

34 commits

hy0kl

5 commits

youkidearitai

2 commits

mihailShumilov/mysql2postgresql

Convert MySQL XML dumps into PostgreSQL schema + data SQL.

PHP

315

63 commits

updated Jan 30, 2020

See the code

README

mysql2postgresql

Converter mysql schema and data to postgresql

Usage

  1. Create dump in xml format using command: mysqldump --xml -u USER_NAME DB_NAME > DUMP_FILE_NAME
  2. Run converter using command: php convertor.php -i DUMP_FILE_NAME -o PSQL_FILE_NAME

Additional options

  • -b50 - set batch count (used on insert data). By default batch count = 200
  • -n - non export structure

Restriction

This converter does not support foreign keys, because mysql does not return foreign key in xml dump Also You must have installed locally php postgresql extension

converter
database
migration
mysql
php
postgresql

Contributors

mihailShumilov

34 commits

hy0kl

5 commits

youkidearitai

2 commits

Languages

PHP

100.0%