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

Fix adding new column in persistent-mysql, and include MigrationTest #1372

Merged
merged 3 commits into from
Mar 19, 2022

Conversation

paul-rouse
Copy link
Contributor

@paul-rouse paul-rouse commented Mar 16, 2022

Fixes #1373. This PR has now been modified to include the fix

Fixes the bug, and adds a test - an existing one, but it wasn't run for MySQL.

It fails at present, but that is the point! There will be a separate issue in a minute.

Before submitting your PR, check that you've:

  • Ran stylish-haskell on any changed files.
  • Adhered to the code style (see the .editorconfig file for details)

After submitting your PR:

@paul-rouse paul-rouse changed the title Include MigrationTest in persistent-mysql tests Fix adding new column in persistent-mysql, and include MigrationTest Mar 18, 2022
@@ -921,7 +921,7 @@ findAlters edef allDefs col@(Column name isNull type_ def gen _defConstraintName
-- new fkey that didn't exist before
[] ->
case ref of
Nothing -> ([Add' col],[])
Nothing -> ([Add' col],cols)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@paul-rouse paul-rouse merged commit b8484fa into yesodweb:master Mar 19, 2022
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.

Adding a column can cause a run-time error in MySQL
2 participants