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

Allow update command to handle additional properties that are passed on the command line DAT-15769 #4726

Merged
merged 3 commits into from Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -119,7 +119,6 @@ protected <T extends DatabaseObject> void compareObjectType(Class<T> type, Datab
if (referenceSnapshot.get(comparisonObject) == null) {
diffResult.addUnexpectedObject(comparisonObject);
}
// }
}
}

Expand Down
Expand Up @@ -1399,7 +1399,7 @@
final ResourceAccessor fileOpener = this.getFileOpenerResourceAccessor();

if (COMMANDS.DIFF.equalsIgnoreCase(command) || COMMANDS.DIFF_CHANGELOG.equalsIgnoreCase(command)
|| COMMANDS.GENERATE_CHANGELOG.equalsIgnoreCase(command) || COMMANDS.UPDATE.equalsIgnoreCase(command)
|| COMMANDS.GENERATE_CHANGELOG.equalsIgnoreCase(command)
|| COMMANDS.RELEASE_LOCKS.equalsIgnoreCase(command)
|| COMMANDS.ROLLBACK.equalsIgnoreCase(command) || COMMANDS.ROLLBACK_SQL.equalsIgnoreCase(command)) {
this.runUsingCommandFramework();
Expand Down Expand Up @@ -1563,6 +1563,8 @@
} catch (LiquibaseException updateException) {
handleUpdateException(database, updateException, defaultChangeExecListener, rollbackOnError);
}
} else if (COMMANDS.UPDATE.equalsIgnoreCase(command)) {
liquibase.update(new Contexts(contexts), new LabelExpression(getLabelFilter()));

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
Liquibase.update
should be avoided because it has been deprecated.
} else if (COMMANDS.UPDATE_COUNT_SQL.equalsIgnoreCase(command)) {
liquibase.update(Integer.parseInt(commandParams.iterator().next()), new Contexts(contexts), new
LabelExpression(getLabelFilter()), getOutputWriter());
Expand Down