diff --git a/jOOQ/src/main/java/org/jooq/impl/Diff.java b/jOOQ/src/main/java/org/jooq/impl/Diff.java index bfb91a286c..ffc821c5a7 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Diff.java +++ b/jOOQ/src/main/java/org/jooq/impl/Diff.java @@ -111,6 +111,7 @@ import org.jooq.Query; import org.jooq.SQLDialect; import org.jooq.Schema; import org.jooq.Sequence; +// ... import org.jooq.Table; import org.jooq.TableOptions.TableType; import org.jooq.UniqueKey; @@ -243,6 +244,11 @@ final class Diff { for (Sequence seq : s.getSequences()) dropSequence().drop(r, seq); + + + + + if (!StringUtils.isEmpty(s.getName())) r.queries.add(ctx.dropSchema(s)); } @@ -250,11 +256,31 @@ final class Diff { (r, s1, s2) -> { appendDomains(r, s1.getDomains(), s2.getDomains()); appendTables(r, s1.getTables(), s2.getTables()); + + + appendSequences(r, s1.getSequences(), s2.getSequences()); } ); } + + + + + + + + + + + + + + + + + private final Drop> dropSequence() { return (r, s) -> r.queries.add(ctx.dropSequence(s)); }