Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHECK constraints being renamed to MySQL defaults #1341

Open
zball opened this issue Nov 30, 2023 · 1 comment
Open

CHECK constraints being renamed to MySQL defaults #1341

zball opened this issue Nov 30, 2023 · 1 comment

Comments

@zball
Copy link

zball commented Nov 30, 2023

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!

@meiji163
Copy link
Contributor

meiji163 commented Nov 5, 2024

Yes we'd welcome a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants