Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
getSchemaOfAlterCollection,
getSchemaNameFromCollection,
getNamePrefixedWithSchemaName,
wrapInQuotes,
} = require('../../../utils/general');
const { assignTemplates } = require('../../../utils/assignTemplates');
const templates = require('../../../ddlProvider/templates');
Expand Down Expand Up @@ -40,10 +41,7 @@ const getRenameTableScriptDtos = collection => {
const isContainerActivated = isParentContainerActivated(collection);
const isCollectionActivated = isContainerActivated && isObjectInDeltaModelActivated(collection);

const script = alterTableName(
getNamePrefixedWithSchemaName({ name: oldName, schemaName }),
getNamePrefixedWithSchemaName({ name: newName, schemaName }),
);
const script = alterTableName(getNamePrefixedWithSchemaName({ name: oldName, schemaName }), wrapInQuotes(newName));

return [AlterScriptDto.getInstance([script], isCollectionActivated, false)];
};
Expand Down
2 changes: 1 addition & 1 deletion shared/Db2Client/src/main/java/org/db2/Db2Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public int applyScript(String script) throws SQLException {
}

private String removeComments(String script) {
return script.replaceAll("(?s)(?m)(?<=\\n)(?:/\\*.*?\\*/|--.*?$)(?=\\n)", "");
return script.replaceAll("(?s)(?m)(?:^|(?<=\\n))(?:/\\*.*?\\*/|--.*?)(?=\\n|$)", "");
}

private String[] splitStatements(String query) {
Expand Down
Binary file modified shared/addons/Db2Client.jar
Binary file not shown.