更改 PostgreSql 数据库中某个表的时间属性并设置默认值
ALTER TABLE questions ALTER COLUMN postDate TYPE timestamp(0) without time zone ;
ALTER TABLE questions ALTER COLUMN postDate SET DEFAULT current_timestamp ;
ALTER TABLE questions ALTER COLUMN postDate TYPE timestamp(0) without time zone ;
ALTER TABLE questions ALTER COLUMN postDate SET DEFAULT current_timestamp ;