Liquibase: How to set the default value of a date column to be “now” in UTC format?

前端 未结 6 598
忘掉有多难
忘掉有多难 2021-01-07 16:20

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

6条回答
  •  天命终不由人
    2021-01-07 17:07

    Maybe this topic in the liquibase forum will help?

    I think defaultValueComputed will take a database specific function to express "now". In mySQL it would be CURRENT_TIMESTAMP so it could look like this:

    
        
    
    

    (Copied from the forum post.)

提交回复
热议问题