From 3bc1058b2202578009c4f96fe0e7461eb8c29fe7 Mon Sep 17 00:00:00 2001 From: Mike Olivas <47544147+molivasdat@users.noreply.github.com> Date: Fri, 4 Feb 2022 09:09:43 -0600 Subject: [PATCH] Added example rollback scripts (#2367) When running the examples with the example-changelog.sql you cannot rollback your changes. This enhancement allows you to see the example scripts you would use to rollback your changes and allows you to use the rollback commands with this changelog. Also helps the init project --- .../resources/liquibase/examples/sql/example-changelog.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/liquibase-core/src/main/resources/liquibase/examples/sql/example-changelog.sql b/liquibase-core/src/main/resources/liquibase/examples/sql/example-changelog.sql index 5e89d1b7aef..1481b40631d 100644 --- a/liquibase-core/src/main/resources/liquibase/examples/sql/example-changelog.sql +++ b/liquibase-core/src/main/resources/liquibase/examples/sql/example-changelog.sql @@ -8,6 +8,7 @@ create table person ( address2 varchar(50), city varchar(30) ) +--rollback DROP TABLE person; --changeset your.name:2 create table company ( @@ -17,7 +18,9 @@ create table company ( address2 varchar(50), city varchar(30) ) +--rollback DROP TABLE company; --changeset other.dev:3 alter table person add column country varchar(2) +--rollback ALTER TABLE person DROP COLUMN country;