2

I’m using Liquibase 3.3 with MySql 5.5.37. I had a column with

+--------------+-------------+------+-----+---------+-----------------------------+
| Field        | Type        | Null | Key | Default | Extra                       |
+--------------+-------------+------+-----+---------+-----------------------------+
| CLOSED_DATE  | timestamp   | NO   |     | NULL    | on update CURRENT_TIMESTAMP |

What is the right way in Liquibase to remove the “on update CURRENT_TIMESTAMP” clause and just make it NULL? I tried

    <dropDefaultValue columnDataType="TIMESTAMP"
        columnName="CLOSED_DATE"
        tableName="sb_group"/>

but that didn’t do anything.

Dave
  • 15,639
  • 133
  • 442
  • 830

1 Answers1

0

That sounds very platform-specific, so you probably need to use a custom <sql> tag in your changes:

<sql dbms="mysql">
  custom SQL goes here
</sql>

But you'll have to replace "custom SQL goes here" with the appropriate MySQL syntax to remove the "on update" clause.

Martin McCallion
  • 743
  • 1
  • 4
  • 22