すんごい悩んだ。
思ったよりMySQL とPostgreSQLって違いがあるんだなぁ。
解説
結局MySQLではdatetime型を使い、insert時にNOW()で現在時刻を入れるようにした。
こんな感じ
create table sample1
(
seq_no integer not null primary key,
create_date datetime not null
);PostgreSQLだとこんな感じで済む
"create_date" timestamp DEFAULT "timestamp"('now'::text) not null,ネタ元