foreign key implementation
- Dominant language
- Go
- Stars
- 13.6k
- Forks
- 1.4k
- Avg merge
- 2h 31m
- Merged PRs (30d)
- 4
Description
Hi,
I spoke with @shlomi-noach and @jonahberquist during last Percona Europe in Dublin regarding the possibility of this amazing tool start supporting foreign keys. We are facing the same issues that you faced before with **pt-online-schema-change** but in our case we have foreign keys referenced to our most busiest tables.
I thought of the following implementation to support foreign keys:
1. At the time of swap, create one session to the master (if applying changes on master) or slave (if testing in a slave)
2. SET FOREIGN_KEY_CHECKS = 0;
3. On same session as point 2, generate new foreign keys to point to ghost table. (we don't care about keeping the same name on constraints)
4. Swap
What do you think of this idea? It would be great if you could give me your feedback on this. If you allow, I'd also come up with a PR with this implementation.
Thanks,
Pedro.
Contributor guide
Assessment
This issue has not been assessed yet.