Migration script from mysql to PostgreSQL