-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix for DAT-15716 :: Include 'OR REPLACE' instruction for a view when generate-changelog/diff-changelog command are executed #5304
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3b378ed
- Support added to include 'OR REPLACE' instruction for a view when u…
MalloD12 ee26108
DiffChangelog tests added.
MalloD12 578d31b
Merge branch 'master' into DAT-15716
MalloD12 e2b4a16
Review comment applied, plus change on file name from diff tests.
MalloD12 f201bcc
- Removed global configuration, and instead added as a new command ar…
MalloD12 d626bee
Merge branch 'master' into DAT-15716
MalloD12 af7b8d8
Diff test assertions updated.
MalloD12 bbe4d21
- Review comments applied.
MalloD12 23012ce
- Test assertion updated.
MalloD12 c50e27a
Test assertion updated - Postgres not using camel case for view name.
MalloD12 44dcc1b
Merge branch 'master' into DAT-15716
MalloD12 dd75423
Merge conflicts resolved.
MalloD12 739b650
Merge branch 'master' into DAT-15716
MalloD12 2556a0e
Merge branch 'master' into DAT-15716
MalloD12 84921cf
Add support to use useOrReplaceOption property in maven for generate-…
MalloD12 cdf911e
Merge branch 'master' into DAT-15716
MalloD12 5f6b2b9
Merge branch 'master' into DAT-15716
rberezen File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
liquibase-standard/src/main/java/liquibase/change/ReplaceIfExists.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package liquibase.change; | ||
|
||
/** | ||
* ReplaceIfExists interface will control whether an implementation change object class will set the replaceIfExists flag that basically will tell | ||
* generate-changelog/diffToChangelog commands the given change object needs to generate the SQL for replace the stored logic if it already exists | ||
*/ | ||
public interface ReplaceIfExists { | ||
|
||
void setReplaceIfExists(Boolean flag); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't necessary for this PR, but instead of repeating the argument, you can make a new class that extends
AbstractArgumentCommandStep
, and then specify that as arequiresDependency
here and in every other class which requires this argument. This helps to reduce the code duplication.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created an abstract class with some common behavior that
GenerateChangelogCommandStep
andDiffChangelogCommandStep
both use, I was thinking once that PR is merged to move this new argument there, and then in these two command classes do this:What do you think about it?
Thanks,
Daniel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good. I don't think that's been done before, but it sounds simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is! @filipelautert showed me yesterday that was already applied to
RollbackCommandStep
, so I applied the same to GenerateChangelog and DiffChangelog command step classes.