CHECK constraints being renamed to MySQL defaults
gh-ost version: 1.1.6
We noticed when migrating tables with named CHECK constraints, they were renamed after the migration to the MySQL default names.
eg:
A CHECK constraint on a table foo named my_check_constraint is renamed to foo_check_1 after a gh-ost migration of table foo.
I suspect this is because it looks like gh-ost is using a CREATE TABLE ... LIKE stmt referenced here. CREATE TABLE ... LIKE will copy the CHECK constraints but generate their names. [src]
For CREATE TABLE ... LIKE, the destination table preserves CHECK constraints from the original table, except that all the constraint names are generated.
We'd like to keep these CHECK constraint names consistent if possible. Is this a feature that can be added in a future release or a welcomed PR?
Thanks for all of the great work on gh-ost!
Source: github/gh-ost