alterRowAccessPolicyComment
Sets or removes the comment on an existing row access policy 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 catalog (database) containing the policy | No |
| String | Name of the schema containing the policy | No |
| String | Name of the row access policy to alter | Yes |
| Boolean | Only alter if the policy exists using | No |
| String | New comment text to set* | No |
| Boolean | Remove the existing comment* | No |
* Exactly one of newComment or unsetComment 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">
<!-- Set comment -->
<changeSet id="policy-set-comment" author="examples">
<pro-snowflake:alterRowAccessPolicyComment policyName="DEPARTMENT_ACCESS_POLICY">
<pro-snowflake:newComment>Row-level security for department data access</pro-snowflake:newComment>
</pro-snowflake:alterRowAccessPolicyComment>
</changeSet>
<!-- Set comment with IF EXISTS -->
<changeSet id="policy-set-comment-if-exists" author="examples">
<pro-snowflake:alterRowAccessPolicyComment
policyName="TENANT_ISOLATION_POLICY"
ifExists="true">
<pro-snowflake:newComment>Multi-tenant data isolation policy</pro-snowflake:newComment>
</pro-snowflake:alterRowAccessPolicyComment>
</changeSet>
<!-- Unset comment -->
<changeSet id="policy-unset-comment" author="examples">
<pro-snowflake:alterRowAccessPolicyComment
policyName="LEGACY_POLICY"
unsetComment="true"/>
</changeSet>
</databaseChangeLog>