undropSchema
Restores a dropped schema using Snowflake Time Travel. The schema must have been dropped within the data retention period.
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 dropped schema | No |
| String | Name of the schema to restore | Yes |
<?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 undrop -->
<changeSet id="undrop-schema" author="examples">
<pro-snowflake:undropSchema schemaName="ANALYTICS"/>
</changeSet>
<!-- Undrop with catalog name -->
<changeSet id="undrop-schema-with-catalog" author="examples">
<pro-snowflake:undropSchema
catalogName="PROD_DB"
schemaName="STAGING"/>
</changeSet>
</databaseChangeLog>