ignore
The ignore
attribute is a Boolean that tells Liquibase to treat a particular changeset as if it does not exist. The default value is false. It is available for XML, YAML, and JSON changelogs in Liquibase 3.6+ and for formatted SQL changelogs in Liquibase 4.19.0+.
Uses
The ignore
attribute is useful if you want to make a database deployment, but want to exclude certain changesets from the deployment. For example, you may have a changeset that should not be executed during an update, but you want to keep the changeset in the changelog for tracking purposes.
Syntax
--liquibase formatted sql
--changeset adrian:1 ignore:true
create table person (
name varchar(255)
);
{
"databaseChangeLog":[
{
"changeSet": {
"author": "adrian",
"id": "1",
"ignore": "true",
"changes": [
{
"createTable": {
"tableName": "person",
"columns": [
{
"column": {
"name": "name",
"type": "varchar(255)"
}
}
]
}
}
]
}
}
}
databaseChangeLog:
- changeSet:
author: adrian
id: 1
ignore: true
changes:
- createTable:
tableName: person
columns:
- column:
name: name
type: varchar(255)
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd
http://www.liquibase.org/xml/ns/pro
http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd">
<changeSet author="adrian" id="1" ignore="true">
<createTable tableName="person">
<column name="name" type="varchar(255)"/>
</createTable>
</changeSet>
</databaseChangeLog>