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 #671 - revise handling of 'default null' in mysql #672

Merged
merged 2 commits into from
May 16, 2017

Conversation

paul-rouse
Copy link
Contributor

This PR undoes #641, which broke text/blob fields (#671), and fixes the handling of "default=NULL" by silently ignoring it. Giving this default explicitly never makes any difference, since it is the implicit default for any nullable field. The original problem addressed by #641 is that MySQL does not retain the distinction between the implicit and explicit versions, so migration could get confused, but #641 resolved the ambiguity in the direction of the explicit declaration, which causes an error for text/blob fields. This PR goes in the other direction, and makes it implicit.

@snoyberg This is relatively serious, because the Yesod MySQL scaffolding is currently broken, but perhaps @qrilka would like a little while to confirm that the original problem is fixed.

@snoyberg
Copy link
Member

Awesome, thank you! Could you add a ChangeLog note explaining the bug that this fixes? Once that's in, I'll merge and release.

@paul-rouse
Copy link
Contributor Author

Thanks for the reminder, here it is! I had meant to put it in once the discussion was finished...

@snoyberg snoyberg merged commit 6968640 into yesodweb:master May 16, 2017
@snoyberg
Copy link
Member

Thanks! New version is now on Hackage.

naushadh added a commit to naushadh/persistent that referenced this pull request Aug 7, 2017
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

3 participants