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 defaults for users table. #216

Merged
merged 1 commit into from Jul 6, 2015

Conversation

Projects
None yet
3 participants
@simensen
Copy link
Contributor

simensen commented Jul 2, 2015

When using more strict MySQL settings it is not possible to add records without specifying values for NOT NULL columns unless a default is specified. Phinx creates NOT NULL columns by default so many fields were giving us problems when trying to register a user without giving a proper value for many fields that the signup controller wasn't asking about.

This fixes the problem by altering the database schema such that the fields in question will either allow null values or specify a default value in the case that NULL is used or no value is provided.

Important Note

For people with strict MySQL settings, this migration will most likely not be reversible as columns will end up with NULL values and reversing this migration results in making those columns NOT NULL.

People with less-strict MySQL settings will not have any problems with this, though.

Fix defaults for users table.
When using more strict MySQL settings it is not possible to add records without
specifying values for NOT NULL columns unless a default value is specified.
Phinx creates NOT NULL columns by default so many fields were giving us
problems when trying to register a user without giving a proper value
for many fields that the signup controller wasn't asking about.

This fixes the problem by altering the database schema such that the fields in
question will either allow null values or specify a default value in the case
that NULL is used or no value is provided.
@davedevelopment

This comment has been minimized.

Copy link

davedevelopment commented Jul 2, 2015

👍

chartjes added a commit that referenced this pull request Jul 6, 2015

@chartjes chartjes merged commit bb8fe03 into opencfp:master Jul 6, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@simensen

This comment has been minimized.

Copy link
Contributor

simensen commented Jul 6, 2015

Thanks, @chartjes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment