Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mariuz/mysql2firebird

Quick and Dirty converter to automate conversion of MySQL database to Firebird (originally created by Milan Babuskov)
https://github.com/mariuz/mysql2firebird

firebird mysql php

Last synced: 5 days ago
JSON representation

Quick and Dirty converter to automate conversion of MySQL database to Firebird (originally created by Milan Babuskov)

Awesome Lists containing this project

README

        

Small parser that changes from MySQL to Firebird syntax. Currently it only supports
database structure dump (no data, only structure) from PHPMyAdmin and MySql Workbench
Not all datatypes are supported, but feel free to "fix" it. It's written
in PHP and it's open source.

Here is a quick overview

Make sure you test the output before using it in production. It does support some tricky
stuff like auto increment columns and LAST_INSERT_ID. There is a
stored procedure for this at the end of the script, you can call it
like this:

select id from last_insert_id;
On Windows, you can run the program like this:

php.exe -f mysql2firebird.php mysql_dump.sql > firebird_dump.sql

Once you create the Firebird script, make sure you search for text
WARNING: which might indicate some incompatibilities. For example,
Firebird does not have tinyint, mediumint and unsigned datatypes.
Also, check for TEXT and LONGTEXT. I’m using UTF8, so I converted
those to varchar(8000), which might not be what you want. Maybe BLOB
SUB_TYPE 0 would be a better choice

Originally created by Milan Babuskov
http://www.backwardcompatible.net/115-converting-mysql-database-to-firebird