Hi,
I tried to copy the schema from an existing database to a new one using generateChangeLog on the old database followed by migrate/update (is there difference or are they just aliases?) on the new one.
The update failed with "ORA-01401: inserted value too large for column"
After a little digging I identified part of the problem the sql produced by updateSQL is:
CREATE TABLE BT0004 (B0004TIMESTAMP VARCHAR2(26 BYTE) DEFAULT
’(TO_CHAR(SYSDATE, ‘‘YYYY-MM-DD-HH24.MI.SS’’)) ’ NOT NULL,
If I replace '(TO_CHAR(SYSDATE, ‘‘YYYY-MM-DD-HH24.MI.SS’’)) ’ with say 'foo’
the import works.
From SQLPlus the default is:
SQL> select data_default from user_tab_columns where table_name=‘BT0004’ and column_name=‘B0004TIMESTAMP’;
DATA_DEFAULT
--------------------------------------------------------------------------------
(TO_CHAR(SYSDATE, ‘YYYY-MM-DD-HH24.MI.SS’))
I’m not exactly sure what’s gone wrong (I am relatively new to Oracle as well as liquibase).
Is this a known bug?
What is the best workaround? I am likely to encounter several more instances of this.
Regards,
Bruce.