Liquibase:如何将默认TimeStamp设置为0?

时间:2014-05-27 18:10:59

标签: mysql sql liquibase

MySQL似乎支持

CREATE TABLE t1 (
  ts TIMESTAMP DEFAULT 0
);

我用Liquibase做,

<column name="updated_at" type="TIMESTAMP" defaultValue="0">
</column>

但是当我跑这个时,我看到了

Caused by: liquibase.exception.DatabaseException: Error executing SQL INSERT INTO PUBLIC.network (id, network_id, name, display_name) VALUES (0, 0, 'Yahoo! Ad Network', 'YAN-US'): Cannot parse "TIMESTAMP" constant "0"; SQL statement:
INSERT INTO PUBLIC.network (id, network_id, name, display_name) VALUES (0, 0, 'Yahoo! Ad Network', 'YAN-US') [22007-178]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:61)

0 个答案:

没有答案