How do you set the default value of a date column to be \"now\" in UTC format? I think the answer involves the defaultValueComputed
attribute on the column elem
In MySQL, to use a DATETIME column with fractions of second like DATETIME(6)
(microseconds precision), use default value of NOW(6)
(caution: CURRENT_TIMESTAMP(6)
for some reason produces an error with me using liquibase 3.5.3):
Note that the value will be stored internally in UTC, but read using the server's timezone settings (@@global.time_zone
, @@session.time_zone
).