News for hackers. Stuff that matters.
Re:GitHub's online schema migration for MySQL by shlomi-noach on Thursday May 03, 2018 @02:27AM (#16983784)
Author of gh-ost here. Actually, it should be possible to support child-side foreign keys. They would have to be named differently (the foreign key constraint has a unique name in a schema) -- but it should work. See discussion in https://github.com/github/gh-ost/issues/507

It is true that it is not on our roadmap to implement FK support for gh-ost (see https://github.com/github/gh-ost/issues/331), but if anyone wishes to contribute support for FK we're grateful. We've had more complex contributions coming from the community and we're grateful for those.

Re:GitHub's online schema migration for MySQL by killbrad on Thursday May 03, 2018 @03:37AM (#16984052)
Child-side foreign keys? Does that mean constraints in app logic instead of the database?
Re:GitHub's online schema migration for MySQL by shlomi-noach on Thursday May 03, 2018 @04:22AM (#16984224)
No, on the database itself. I used "child side" for lack of better terminology. Every foreign key has two edges: the "parent" table and the "child" table. Rows in the "child" table depend on existence of matching rows in the "parent" table.

It should be feasible to run `gh-ost` to ALTER a table that only has "child"-side constraints. It will be impossible to run `gh-ost` to ALTER a table that has "parent" side constraints.

Hope this clarifies.