4 Replies Latest reply: Jun 11, 2013 3:51 AM by MichaelChristofides RSS

    Database Diff produces ddl with conflicts

    1012089
      I tried to use database diff to migrate changes from one schema to another. This includes a couple of new tables.
      However, the diff produces a ddl script which looks like this:

      ...
      ---------------------------
      --New TABLE
      --TABB
      ---------------------------
      CREATE TABLE "A"."TABB"
      (     ...
           CONSTRAINT "TABB_FK" FOREIGN KEY ("A")
           REFERENCES "A"."TABA" ("ID") ENABLE
      );
      ---------------------------
      --New TABLE
      --TABA
      ---------------------------
      CREATE TABLE "A"."TABA"
      ...

      So I cannot execute the script as-is because it tries to create a reference to TABA before it is created.
      Is there not setting to have the constraints generated as ALTER statements and in the appropriate sequence? Or is there a better way to migrate changes between schema's/databases?