From 7aa231fc2938612db9f32d9f71046b4fe73e4237 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Tue, 15 Oct 2019 15:53:49 +0200 Subject: [PATCH] [jOOQ/jOOQ#8528] Interpret ALTER TABLE .. ADD UNIQUE --- jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java b/jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java index 94149425ea..6173ac01fc 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java +++ b/jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java @@ -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); }