Reputation: 11
I create a table with Liqibase on our test Databse we have no Problem to create following table:
CREATE TABLE ICEM_DEP.T_APP_UNIT_ENV_INST_OBJ (
ENVIRONMENT_ID INTEGER NOT NULL,
INSTANCE_ID INTEGER NOT NULL,
OBJECT_NAME VARCHAR(4000) NOT NULL,
APP_UNIT_ID INTEGER NOT NULL,
CREATION_DATE TIMESTAMP DEFAULT current timestamp(0),
LAST_CHANGE_DATE TIMESTAMP DEFAULT current timestamp(0),
CREATION_USER INTEGER NOT NULL,
LAST_CHANGE_USER INTEGER NOT NULL,
ACTION_FLAG VARCHAR(1)
)
If I run this statement on the costumer database the is following Error:
DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=(;LT current timestamp;DEFAULT, DRIVER=4.13.127
Any Suggestion?
Upvotes: 1
Views: 1222
Reputation: 8647
did you try with
CREATION_DATE TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP,
LAST_CHANGE_DATE TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP,
Upvotes: 1
Reputation: 27486
The format for passing the lowest possible value to the Timestamp Function is
Either
TIMESTAMP('0001-01-01',0)
or
TIMESTAMP('0001-01-01-00.00.00.00000')
Upvotes: 0