dropSequence
Drops an existing sequence 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 sequence | No |
| String | Name of the schema containing the sequence | No |
| String | Name of the sequence to drop | Yes |
| Boolean | Don't error if the sequence doesn't exist using IF EXISTS | No |
| String | CASCADE (drop dependent objects) or RESTRICT (fail if dependencies) | 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">
<!-- Basic drop -->
<changeSet id="drop-sequence" author="examples">
<pro-snowflake:dropSequence sequenceName="OLD_SEQUENCE"/>
</changeSet>
<!-- Drop with IF EXISTS -->
<changeSet id="drop-sequence-if-exists" author="examples">
<pro-snowflake:dropSequence
sequenceName="TEMP_SEQUENCE"
ifExists="true"/>
</changeSet>
<!-- Drop with CASCADE -->
<changeSet id="drop-sequence-cascade" author="examples">
<pro-snowflake:dropSequence
sequenceName="LEGACY_SEQUENCE"
ifExists="true"
dropMode="CASCADE"/>
</changeSet>
</databaseChangeLog>