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.
-
Learn
-
Resources
-
Free Tools
OSS Risk Scanner Database DevOps Risk AssessmentCheat Sheets
Snowflake + Liquibase Databricks + Liquibase -
eBooks
6 Liquibase Community Risks & How to Avoid Guide: SOC 2 Compliance at the Database Layer Guide: Quantify the Value of Liquibase Secure -
Comparison Guides
Liquibase vs. Flyway Liquibase vs. Bytebase Liquibase Community vs Liquibase Secure
-
- Quickstart
- Get Started
- Documentation
- University
-
Resources
- Connect
- Contribute
- Join
- Blog