Migration of a MySQL database to PostgreSQL DB


I am new to Liquibase, Sorry for the simple question.

I plan migrate mysql to psql in my project. The step i did use ant:

–>generate change log from mysql.

–>use change log to update psql

it’s seem to work well, but the problem is :as we know, psql is case insensitive, but when i update database, i found liquibase crate table name with original case. this take trouble for me. i need to psql keep all table name with lowercase. 

So, anyone know how  can i make liquibase create table with lowercase tablename when i update in psql?



The enum support is different for postgres and mysql.  http://www.postgresql.org/docs/9.1/static/datatype-enum.html describes how enums work in postgres.


Probably the best thing to do is to modify the changelog after you generate it from mysql and before you apply it to postgres. You should be able to write a script to lowercase table name attributes in the XML if you have a lot of tables.


Thanks your reply,

I found there is another small problem, I have a column type as enmu in MySQL,  when i generate change log from mysql, it show in log as : 




when i update in PostgreSQL use this log, i get error :  ERROR: type “enum” does not exist

How could i solve this problem ?




I get This error when i generate change log from mysql:

liquibase.exception.DatabaseException: java.text.ParseException: Unknown bit value: 4

… 23 more

Any ideal for this problem?



I just get answer from this topic:


Thanks anyway