alterSchemaProperties
Sets or unsets multiple properties on an existing schema in Snowflake.
Note: This change type does not support automatic rollback or database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the database containing the schema | No |
| String | Name of the schema to alter | Yes |
| Boolean | Only alter if the schema exists using | No |
| Integer | Number of days to retain data for Time Travel* | No |
| Integer | Maximum days to extend data retention | No |
| String | Comment text for the schema | No |
| String | Default collation for string columns | No |
| String | Fully-qualified name of classification profile | No |
| String | Object visibility setting ( | No |
| String | Log level ( | No |
| String | Trace level ( | No |
| String | Default CPU compute pool for notebooks | No |
| String | Default GPU compute pool for notebooks | No |
| String | Default warehouse for Streamlit notebooks | No |
| Boolean | Enable replication with failover groups (YES/NO) | No |
| Boolean | Unset data retention time | No |
| Boolean | Unset max data extension time | No |
| Boolean | Remove the comment | No |
| Boolean | Unset default DDL collation | No |
| Boolean | Unset classification profile | No |
| Boolean | Unset object visibility | No |
| Boolean | Unset log level | No |
| Boolean | Unset trace level | No |
| Boolean | Unset CPU compute pool | No |
| Boolean | Unset GPU compute pool | No |
| Boolean | Unset Streamlit warehouse | No |
| Boolean | Unset replicable with failover groups | No |
* Standard Edition supports 0 or 1 only; Enterprise Edition supports 0-90 days.
At least one SET or UNSET property must be specified. Cannot mix SET and UNSET in the same changeset.
<?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">
<!-- Set properties -->
<changeSet id="set-schema-properties" author="examples">
<pro-snowflake:alterSchemaProperties
schemaName="ANALYTICS"
ifExists="true"
dataRetentionTimeInDays="1"
logLevel="INFO"
traceLevel="ALWAYS"
comment="Analytics schema"/>
</changeSet>
<!-- Unset properties -->
<changeSet id="unset-schema-properties" author="examples">
<pro-snowflake:alterSchemaProperties
schemaName="ANALYTICS"
ifExists="true"
unsetComment="true"
unsetLogLevel="true"
unsetTraceLevel="true"/>
</changeSet>
<!-- Set all properties -->
<changeSet id="set-all-properties" author="examples">
<pro-snowflake:alterSchemaProperties
schemaName="PRODUCTION_DATA"
dataRetentionTimeInDays="1"
maxDataExtensionTimeInDays="14"
comment="Production data schema"
defaultDdlCollation="en-ci"
logLevel="WARN"
traceLevel="OFF"
replicableWithFailoverGroups="true"/>
</changeSet>
</databaseChangeLog>