update foreign keys when table name changes#5482
Conversation
|
Not sure who to tap for review - @pleerock how do I decide? |
|
Cc @csuich2 |
|
ping @pleerock @Kononnable @AlexMesser not sure who is maintaining this project |
|
Schema synchronization is the part developed by @AlexMesser and I'm really scary to touch these areas. Hope @AlexMesser can review this PR. |
| `ALTER TABLE "post" DROP CONSTRAINT "FK_4490d00e1925ca046a1f52ddf04"` | ||
| ]); | ||
| } finally { | ||
| connection.close(); |
|
This is an acceptable solution for now, but later we need to include referenced table name in to foreign key name to keep synchronization process consistent |
|
I had the same thought about including table name in the foreign key name, but that would cause all existing foreign key hashes to change, so a fairly significant, if not breaking, change. Should we consider that for the next major release? |
|
@csuich2 maybe not next, but next next next one :D Let's merge it for now. Thanks! |
Closes #5119 , based on #5120
Includes a check for the correct table name when checking for equality of foreign keys, to decide if they should be dropped and made fresh