Liquibase provides a <validCheckSum>
tag to allow for a new checksum to be specified in case we want to modify an existing changeset.
However, this tag is not a valid attribute for SQL-formatted changesets. There is runOnChange
, but that's different.
Is there any way of achieving that?
Basically, I made a mistake on a changeset, and I can't even add a rollback command because liquibase detects the checksum change and spits an error, so I'm stuck.
EDIT
The concrete changeset that I'm trying to change is:
--liquibase formatted sql
--changeset myname:0
ALTER TABLE `customers`
CHANGE COLUMN `name` `firstName` VARCHAR(45) NULL;
--changeset myname:1
ALTER TABLE `customers`
ADD COLUMN `lastName` VARCHAR(45) NULL AFTER `firstName`;
And I keep it in a file changelog_1.05.sql
. Finally, I include that file in my changelog.xml
:
<include file="changelog_1.05.sql" relativeToChangelogFile="true"/>
I can't add <validCheckSum>
because is a SQL-formatted file, so no xml tags can be added there.