Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
If we have a schema in MYSQL which has a default value defined for a datetime column, it does not get exported properly and thus we face syntax errors while importing.
Consider this schema:
create table m (date_status_changed datetime DEFAULT (curtime()));
This gets exported as:
CREATE TABLE m (
date_status_changed timestamp without time zone DEFAULT CURRENT_TIMESTAMP::(0)::timestamp without time zone(0)
) ;
Which is syntactically incorrect and we get the error.
Hi Team,
If we have a schema in MYSQL which has a
default
value defined for adatetime
column, it does not get exported properly and thus we face syntax errors while importing.Consider this schema:
create table m (date_status_changed datetime DEFAULT (curtime()));
This gets exported as:
Which is syntactically incorrect and we get the error.
Thank You for your help!