dropRole

Drops an existing role in Snowflake.

Note: This change type does not support automatic rollback.

Attributes

Attribute

Type

Description

Required

roleName

String

Name of the role to drop

Yes

ifExists

Boolean

If true, only drops if the role exists using `IF EXISTS`

No

<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">
  <changeSet id="1" author="test">
    <pro-snowflake:dropRole roleName="temporary_role"/>
  </changeSet>
  <changeSet id="2" author="test">
    <pro-snowflake:dropRole roleName="old_role" ifExists="true"/>
  </changeSet>
  <changeSet id="3" author="test">
    <pro-snowflake:createRole roleName="test_drop_role"/>
    <pro-snowflake:dropRole roleName="test_drop_role" ifExists="true"/>
    <rollback/>
  </changeSet>
</databaseChangeLog>