[jOOQ/jOOQ#18493] Diff should export synonyms
This commit is contained in:
parent
8a21c7b98c
commit
8fda06c3ba
@ -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<Sequence<?>> dropSequence() {
|
||||
return (r, s) -> r.queries.add(ctx.dropSequence(s));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user