Skip to content

Commit

Permalink
0005854: Error creation a table with extra _ because sequence does not
Browse files Browse the repository at this point in the history
exists
  • Loading branch information
joshahicks committed Jun 27, 2023
1 parent d0e02f6 commit 67aff1a
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -882,9 +882,13 @@ protected Table getTemporaryTableFor(Table targetTable, String suffix) {
table.setSchema(targetTable.getSchema());
table.setName(targetTable.getName() + suffix);
table.setType(targetTable.getType());
table.removeAllColumnDefaults();
for (int idx = 0; idx < targetTable.getColumnCount(); idx++) {
try {
table.addColumn((Column) targetTable.getColumn(idx).clone());
Column clonedColumn = (Column) targetTable.getColumn(idx).clone();
clonedColumn.setAutoIncrement(false);
clonedColumn.setPrimaryKey(false);
table.addColumn(clonedColumn);
} catch (CloneNotSupportedException ex) {
throw new DdlException(ex);
}
Expand Down

0 comments on commit 67aff1a

Please sign in to comment.