Alter Standard Table - Change Tracking
Modifies change tracking (CDC - Change Data Capture) settings. Change tracking records INSERT, UPDATE, and DELETE operations for streaming data integration.
Known limitations:
This change type does not support automatic rollback.
Snowflake snapshots created with Liquibase Secure 5.1 are incompatible with earlier versions due to enhanced object type detection for TABLES and VIEWS. Regenerate all snapshots with 5.1 after upgrading to avoid false differences in diff and diff-changelog operations.
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the catalog (database) containing the table | No |
| String | Name of the schema containing the table | No |
| String | Name of the table to alter | Yes |
| Boolean | Only execute if the table exists | No |
alterChangeTracking nested attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| Boolean | New change tracking value | No* |
| Boolean | If true, unsets change tracking | No* |
*Exactly one of newChangeTracking or unsetChangeTracking must be specified.
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:pro-snowflake="http://www.liquibase.org/xml/ns/pro-snowflake"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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/pro-snowflake
http://www.liquibase.org/xml/ns/pro-snowflake/liquibase-pro-snowflake-latest.xsd">
<!-- Enable change tracking -->
<changeSet id="enable-change-tracking" author="examples">
<pro-snowflake:alterStandardTable tableName="CUSTOMER_DATA">
<pro-snowflake:alterChangeTracking newChangeTracking="true"/>
</pro-snowflake:alterStandardTable>
</changeSet>
<!-- Disable change tracking -->
<changeSet id="disable-change-tracking" author="examples">
<pro-snowflake:alterStandardTable tableName="STATIC_REFERENCE_DATA">
<pro-snowflake:alterChangeTracking newChangeTracking="false"/>
</pro-snowflake:alterStandardTable>
</changeSet>
<!-- Unset change tracking -->
<changeSet id="unset-change-tracking" author="examples">
<pro-snowflake:alterStandardTable tableName="LEGACY_TABLE">
<pro-snowflake:alterChangeTracking unsetChangeTracking="true"/>
</pro-snowflake:alterStandardTable>
</changeSet>
</databaseChangeLog>