fordfrog / apgdiff

Another PostgreSQL Diff Tool
http://www.apgdiff.com
MIT License
353 stars 138 forks source link

Changing the foreign key constraint fails #229

Open gokulapriya4 opened 6 years ago

gokulapriya4 commented 6 years ago

new.txt old.txt

I have herewith attached 2 sample files , which I apply it to a database and generate 2 dumps [old and new] . When I generate the patch using Diff tool and generate the patch, it actually fails . The issue is I am trying to change the primary key which is a candidate of foreign key . So the patch should be generated in the order :

  1. Drop the foreign Key
  2. Drop the primary Key
  3. Then create the new Primary Key
  4. Create a new foreign Key

But the patch generated is not in that order. I am using the Apgdiff tool version 2.4