Change db script from MySQL to PostgreSQL