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

Support --schemas flag both before and after the "snapshot" command #1049

Merged
merged 3 commits into from Apr 3, 2020

Conversation

wwillard7800
Copy link
Contributor

@wwillard7800 wwillard7800 commented Mar 23, 2020

##Overall:
--schemas will only work for snapshot when to the right of the command, but for other liquibase commands, like generatechangelog, it works and is documented as working to the left (in the "global commands" space). we need to make sure --schemas works to the standard usage (to the left of the command).

Context

A Liquibase client was having issue running a diff between a snapshot and multiple schemas.
The user workflow was as follows:

  1. Snapshot the target database with multiple schemas using the flags: "--schema=<schema1,schema2,schema3>"
  2. The user conducts a few changes to the target database.
  3. The user then runs a diffChangeLog between the snapshot and the target database.
    Unfortunately the resulting diffChangeLog did not carry all the changes that were made in all of the schemas specified while doing the original snapshot.
    After support conducted a few tests, it appears that when running the snapshot command, Liquibase does NOT include all the schemas specified with the "--schema<schema1,schema2,schema3>" flag in the snapshot file.
    Instead, it only contains the default schema.

@nvoxland
Copy link
Contributor

This change breaks anyone currently using --schemas after the snapshot command which we cannot do.

We also need to make sure it is used for snapshotReference and dropAll commands.

Copy link
Contributor

@nvoxland nvoxland left a comment

Choose a reason for hiding this comment

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

See above comment

@nvoxland nvoxland changed the title DAT 4119 Support --schemas flag both before and after the "snapshot" command Mar 23, 2020
@datical-jenkins datical-jenkins added RiskMedium Changes that require more testing or that affect many different code paths. StatusDiscovery and removed StatusDiscovery labels Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DBAll IntegrationCLI RiskMedium Changes that require more testing or that affect many different code paths. ThemeUsability TypeBug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants