-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Closed
Description
- Laravel Version: 5.6.17 (lastest)
- PHP Version: 7.2.2 ZTS MSVC15 (Visual C++ 2017) x64
- Database Driver & Version: MariaDB 10.1.14
Description:
Else, ->collection('binary') could fails in some cases, because of the generated code is something like addressable_type varchar(255) collate binary not null (the correct is addressable_type varchar(255) collate "binary" not null).
I think that it should be applied to both: collaction and charset.
It affects MariaDB 10.1, but I don't know if it affects other DBMS and which versions.
I am not the best person to PR that, so if someone could do that, it will be very useful.
Steps to reproduce
Full test case:
Schema::create('addresses', function (Blueprint $blueprint) {
$blueprint->string('addressable_type')->collation(static::COLLATION_BINARY);
});Code generated:
create table `platform_addresses` (`addressable_type` varchar(255) collate binary
not null) default character set utf8mb4 collate utf8mb4_unicode_ciCode manually fixed:
create table `platform_addresses` (`addressable_type` varchar(255) collate "binary"
not null) default character set utf8mb4 collate utf8mb4_unicode_ciReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.