-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix (MSSQL): default end delimiter applied when there is an endDelimiter applied for a given chanset #5781
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
Conversation
…ot been specified. - Test added.
@@ -114,7 +115,12 @@ public MSSQLDatabase() { | |||
|
|||
@Override | |||
public void executeStatements(Change change, DatabaseChangeLog changeLog, List<SqlVisitor> sqlVisitors) throws LiquibaseException { | |||
super.executeStatements(change, changeLog, addSqlVisitors(sqlVisitors)); | |||
if (change instanceof AbstractSQLChange && StringUtil.trimToNull(((AbstractSQLChange) change).getEndDelimiter()) != null) { | |||
super.executeStatements(change, changeLog, sqlVisitors); |
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.
In this case a sqlvisitor for the provided end delimiter is already defined?
FOSSA Snippets Detection 🤖
|
FOSSA Test 🧪
|
… not AbstractSqlChange.
FOSSA Snippets Detection 🤖
|
FOSSA Test 🧪
|
FOSSA Snippets Detection 🤖
|
FOSSA Test 🧪
|
@filipelautert @wwillard7800: I updated the logic added in this PR to avoid not appending the
What this will do is, if endDelimiter is set, but it's a @rberezen: I think this should fix the current issue, but anyway this would be pending on whether this is an appropriate fix or not. Thanks, |
@rberezen could you test it again? thanks! |
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.
Looks good to me, tests passed.
cc @filipelautert @MalloD12
Impact
Description
When
endDelimiter
is specified in a changeset no default endDelimiter should be added to the SQL visitors to be applied.Fixes #5603
Things to be aware of
AppendSqlIfNotPresentVisitor
will be only applied when there is no endDelimiter set for a changeset.Things to worry about
Additional Context