-
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
The onSqlOutput attribute does not work for preconditions in formatted SQL changelogs. #3436
Conversation
|
||
PreconditionContainer pc = new PreconditionContainer(); | ||
pc.setOnFail(StringUtil.trimToNull(parseString(onFailMatcher))); | ||
pc.setOnError(StringUtil.trimToNull(parseString(onErrorMatcher))); | ||
pc.setOnSqlOutput(StringUtil.trimToNull(parseString(onUpdateSqlMatcher))); | ||
if (onSqlOutputMatcher.matches()) { |
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.
@dyadyushko Can you handle the condition that if changelog contains both onUpdateSql and onSqloutput in which case, we should throw an error, "Please modify the changelog to have preconditions set with either "onUpdateSql" or "onSqlOutput"?
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's a good solution
Impact
Description
The attribute to control the behavior of update-sql when using preconditions is onUpdateSQL for formatted SQL changelogs. For all other changelog formats, the attribute is onSqlOutput. We should be consistent so that the same attribute works for all changelog formats. That is, users of formatted sql changelogs should be able to use onSqlOutput.
Things to be aware of
Things to worry about