-
Notifications
You must be signed in to change notification settings - Fork 24.4k
[10.x] Let database handle default collation #6241
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
Conversation
Another thing to be aware of: MySQL 5.7 also doesn't support the collation So setting the default for to |
Thanks for testing @Jubeki I definitely think Laravel 11 should drop support for MySQL 5.x. There have been several other changes in v8, for example the password hashing algorithm. 8.0 was released in 2018 so it’s been out for 5 years now. And supporting backwards compatibility with 5.x would mean reduced compatibility with 8.0. I still think separate mysql and mariadb connections make sense. Oracle are focused on making MySQL a hybrid NoSQL/SQL solution with features like the document store and a bunch of extra JSON functions. MariaDB is mainly focused on being a pure SQL db. I’m sure v9 will see an even bigger divergence between the two. |
Letting the db handle the default collation would be a good stopgap for v10 though. I just meant separate connections would be better long term. |
This reverts commit 74c5a01.
@Jubeki we reverted this one |
I tested with Laravel Sail both MySQL and MariaDB both seem to accept the null value and then each use their own default collation.
Here what I did:
MySQL
Result:
MariaDB
Result:
You can so configure your defaults outside of Laravel if wanted, while still having the option to explicitly set a default for your application.
Risks:
Alternative: Duplicate the mysql entry to mariadb and then change the default collation.
@binaryfire does this solution also work in your case?