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

Use strict mode for mysql #781

Closed
wants to merge 1 commit into from
Closed

Use strict mode for mysql #781

wants to merge 1 commit into from

Conversation

simhnna
Copy link

@simhnna simhnna commented Jan 9, 2018

Use strict mode in mysql. I suspect a couple of errors that are reported when using postgresql result from the fact that testing doesn't enforce strict rules in the first place.

@simhnna
Copy link
Author

simhnna commented Jan 9, 2018

The tests confirm my suspicions...
It's broken for mysql as well, it's just that nobody notices anything...

While this branch makes the tests fail it should still be merged because it shows real errors!
Feel free to adopt the branch and fixing the issues...

@simhnna
Copy link
Author

simhnna commented Jan 9, 2018

The current error is because of a bogus migration in
database/migrations/2016_12_28_150831_change_title_column.php

16:            $table->string('title', 60000)->change();

@divinity76
Copy link

should be developing with sql_mode=TRADITIONAL (and that's pretty much how postgres work by default) - when the code works in TRADITIONAL mode, it should work anywhere, and you'll catch bugs much sooner than running with default mysql settings. (where default mysql will truncate your data, or write 0, or otherwise SILENTLY corrupt your data to make it fit with the schema, TRADITIONAL will throw errors... it's hard to think of scenarios where default mysql mode is actually a good idea)

@i3anaan
Copy link

i3anaan commented Jun 16, 2018

Very much agree with the above, hope this gets picked up. Might actually look more into this myself...

@asbiin
Copy link
Member

asbiin commented Jul 23, 2018

Unfortunately, strcit mysql mode is not possible right now. If anyone wants to help us with that, we will be pleased, but we will not investigate this now.

@asbiin asbiin closed this Jul 23, 2018
@github-actions
Copy link

github-actions bot commented Feb 5, 2021

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants