[jOOQ/jOOQ#19032] ALTER TABLE .. ADD FOREIGN KEY .. REFERENCES references unqualified table name when column is also added
This commit is contained in:
parent
6f3345b55e
commit
03a4ce68a4
@ -1345,13 +1345,16 @@ implements
|
||||
}
|
||||
|
||||
TableElement part = add.get(i);
|
||||
ctx.qualify(false, c -> c.visit(Tools.uncollate(part)));
|
||||
|
||||
// [#19032] We already use DATA_CONSTRAINT_REFERENCE to declare qualified constraint references,
|
||||
// so constraints shouldn't be unqualified here.
|
||||
if (part instanceof Field<?> f) {
|
||||
ctx.sql(' ');
|
||||
ctx.qualify(false, c -> c.visit(Tools.uncollate(part))).sql(' ');
|
||||
toSQLDDLTypeDeclarationForAddition(ctx, table, f.getDataType());
|
||||
CreateTableImpl.acceptColumnComment(ctx, f);
|
||||
}
|
||||
else
|
||||
ctx.visit(Tools.uncollate(part));
|
||||
}
|
||||
|
||||
if (indent)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user