dropView
Drops an existing Snowflake view.
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 view | No |
| String | Name of the schema containing the view | No |
| String | Name of the view to drop | Yes |
| Boolean | If true, only drops the view if it exists using | No |
<?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">
<!-- Drop view with IF EXISTS -->
<changeSet id="drop-view" author="examples">
<pro-snowflake:dropView
viewName="MY_VIEW"
ifExists="true"/>
</changeSet>
<!-- Drop view with schema qualification -->
<changeSet id="drop-view-qualified" author="examples">
<pro-snowflake:dropView
schemaName="ANALYTICS"
viewName="SALES_SUMMARY"
ifExists="true"/>
</changeSet>
<!-- Drop view with full qualification -->
<changeSet id="drop-view-full" author="examples">
<pro-snowflake:dropView
catalogName="MYDB"
schemaName="PUBLIC"
viewName="ACTIVE_CUSTOMERS"
ifExists="true"/>
</changeSet>
</databaseChangeLog>