Fix #671 - revise handling of 'default null' in mysql #672
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.