[jOOQ/jOOQ#9508] Handle edge case

This commit is contained in:
Lukas Eder 2020-01-30 17:09:27 +01:00
parent 2eafa49254
commit c0d825c03e

View File

@ -657,6 +657,16 @@ final class Interpreter {
}
}
Iterator<DelayedForeignKey> it = delayedForeignKeyDeclarations.iterator();
while (it.hasNext()) {
DelayedForeignKey key = it.next();
if (existing.equals(key.table) && key.constraint.getUnqualifiedName().equals(impl.getUnqualifiedName())) {
it.remove();
break dropConstraint;
}
}
if (!query.$ifExistsConstraint())
throw constraintNotExists(query.$dropConstraint());
}