[jOOQ/jOOQ#8528] Interpret ALTER TABLE .. ADD UNIQUE

This commit is contained in:
Lukas Eder 2019-10-15 15:53:49 +02:00
parent e6c869c108
commit 7aa231fc29

View File

@ -323,6 +323,8 @@ final class DDLInterpreter {
throw constraintAlreadyExists(impl);
else
existing.primaryKey = new MutableUniqueKey((UnqualifiedName) impl.getUnqualifiedName(), existing, existing.fields(impl.$primaryKey(), true));
else if (impl.$unique() != null)
existing.uniqueKeys.add(new MutableUniqueKey((UnqualifiedName) impl.getUnqualifiedName(), existing, existing.fields(impl.$unique(), true)));
else
throw unsupportedQuery(query);
}