gimenete / dbdiff

Compares two postgresql or mysql databases and prints SQL commands to modify the first one in order to match the second one
MIT License
131 stars 36 forks source link

Does not seem to handle FK ON DELETE CASCADE change #12

Open siyb opened 7 years ago

siyb commented 7 years ago

Source: TABLE "systemrole" CONSTRAINT "fk474jpkeb2oe23px6stixe16wh" FOREIGN KEY (id) REFERENCES role(id) ON DELETE CASCADE

Target: TABLE "systemrole" CONSTRAINT "fk474jpkeb2oe23px6stixe16wh" FOREIGN KEY (id) REFERENCES role(id)

Command:

dbdiff -l drop $TARGET $SOURCE

Result:

Alter table statements containing not mention of ON DELETE CASCADE

Expected Result:

Alter table statements containing ON DELETE CASCADE changes (drop / recreate for instance)