Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added example rollback scripts #2367

Merged
merged 1 commit into from
Feb 4, 2022
Merged

Added example rollback scripts #2367

merged 1 commit into from
Feb 4, 2022

Conversation

molivasdat
Copy link
Contributor

@molivasdat molivasdat commented Jan 13, 2022

Environment

Liquibase Version: 4.7.0 but any

Liquibase Integration & Version: NA

Liquibase Extension(s) & Version: NA

Database Vendor & Version: H2

Operating System Type & Version: Any

Pull Request Type

  • Bug fix (non-breaking change which fixes an issue.)
  • Enhancement/New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

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

Steps To Reproduce

Use the example example-changelog.sql in the examples/sql directory of liquibase binary install
Run liquibase --changeLogFile=examples/sql/example-changelog.sql update
Run liquibase rollbackCount 3 or any other rollback command.
Error occurs

Rolling Back Changeset:example-changelog.sql::3::other.dev
Unexpected error running Liquibase: No inverse to liquibase.change.core.RawSQLChange created
For more information, please use the --log-level flag

Actual Behavior

Error occurs because there is no rollback command specified with .sql type changes out of the box.

Expected/Desired Behavior

Rollbacks work just fine and is successful with:

Rolling Back Changeset:example-changelog.sql::3::other.dev
Rolling Back Changeset:example-changelog.sql::2::your.name
Rolling Back Changeset:example-changelog.sql::1::your.name

Screenshots (if appropriate)

If applicable, add screenshots to help explain your problem.

Additional Context

Add any other context about the problem here.

Fast Track PR Acceptance Checklist:

Need Help?

Come chat with us on our discord channel


Dev Handoff Notes (Internal Use)

Links

Testing

  • Steps to Reproduce: See above
  • Guidance:
    • Impact: only changes example files

Dev Verification

Code reviewed only

┆Issue is synchronized with this Jira Bug by Unito

Copy link
Contributor

@mariochampion mariochampion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@kataggart kataggart removed their assignment Jan 26, 2022
@StevenMassaro StevenMassaro merged commit 3bc1058 into master Feb 4, 2022
@StevenMassaro StevenMassaro deleted the addexamplerollback branch February 4, 2022 15:09
@nvoxland nvoxland added this to the v4.8.0 milestone Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants