Closed Gnafu closed 1 year ago
WHEN is a reserved word in PostgreSQL so I want to replace it with "WHEN2"
ora2pg.conf
REPLACE_COLS mytable(oid:keyid,ref:keyref,when:when2)
CONSTRAINTS_table.sql
ALTER TABLE mytable ADD PRIMARY KEY (keyid); ALTER TABLE mytable ALTER COLUMN WHEN SET NOT NULL;
Note "oid" has been correctly replaced with "keyid" but the "WHEN" is not "WHEN2" so when applying the CONSTRAINTS, the SQL fails.
Version 23.1 did not generate the "ALTER COLUMN" line, and this constraint is correctly included in the table.sql file in both versions: table.sql
CREATE TABLE mytable ( keyid bigint NOT NULL, when2 timestamp NOT NULL ) ;
This has been fixed:
CREATE TABLE repl_when ( when2 bigint NOT NULL ) ;
ALTER TABLE repl_when ADD PRIMARY KEY (when2);
WHEN is a reserved word in PostgreSQL so I want to replace it with "WHEN2"
ora2pg.conf
CONSTRAINTS_table.sql
Note "oid" has been correctly replaced with "keyid" but the "WHEN" is not "WHEN2" so when applying the CONSTRAINTS, the SQL fails.
Version 23.1 did not generate the "ALTER COLUMN" line, and this constraint is correctly included in the table.sql file in both versions: table.sql