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

Avoid unnecessary REFERENCES clause during table creation #1283

Conversation

codemonkeylabs-de
Copy link

We ran into issue #1158 , which basically renders DB migrations unusable with MariaDB (at least since version 10.5). The solution proposed by Markus Linik (@mklinik) works as expected. In a nutshell, the REFERENCES part of a CREATE TABLE statement is suppressed for foreign keys and this specification is delayed until the subsequent ALTER TABLE which sets it up correctly (as it always has).

Erick Gonzalez added 2 commits June 15, 2021 21:24
…out a FOREIGN_KEY specification which late MariaDB versions considers a malformed statement
@codemonkeylabs-de
Copy link
Author

Closing this pull request so I can resubmit with a clean branch and avoid a messy history

@parsonsmatt parsonsmatt reopened this Nov 26, 2021
@parsonsmatt parsonsmatt changed the base branch from master to matt/persistent-mysql-migration-fix January 26, 2022 23:53
@parsonsmatt
Copy link
Collaborator

going to fix this and get it released tonight, thanks!

@parsonsmatt parsonsmatt mentioned this pull request Jan 27, 2022
7 tasks
parsonsmatt added a commit that referenced this pull request Jan 27, 2022
* avoid specifying a REFERENCES clause during MySQL table creation without a FOREIGN_KEY specification which late MariaDB versions considers a malformed statement

* relax mysql dependency

* changelog, cabal

* stylish-haskell

Co-authored-by: Erick Gonzalez <erick.gonzalez@secucloud.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants