now() 函数不适用于 liquibase 中的 valueBlobFile

now() function is not working with valueBlobFile in liquibase

在 mysql 中插入数据时使用 liquibase 插入标签,如

    <insert tableName="image">
        <column name="body" valueBlobFile="image/logo.png" />
        <column name="createddt" valueDate="now()"/>           
        <column name="updateddt" valueDate="now()" />                     
    </insert>

在 createddt 和 updateddt 列中插入了 NULL。但是,如果使用没有 valueBlobFile 的相同代码,则会正确插入日期。

对于 mysql,您可以使用以下内容:

<insert tableName="image">
    <column name="body" value="LOAD_FILE(image/logo.png)" />
    <column name="createddt" value="now()"/>
    <column name="updateddt" value="now()" />
</insert>