- heddn Nicaragua
Ran into this issue today where contrib module
tailwindcss_utility
uses a blob for a column. See 🐛 MySQL 8.0 support Fixed .
Over in #3232699: SQLite schema introspection implementation struggles with NULL default values → we're fixing some SQLite default value bugs and the fact that MySQL 5.7 doesn't support default values for blob, text and json fields came to light. Drupal has gone through quite a bit of pain over the years with this. See:
The good news is that MySQL changed its handling of default values to allow blob, text or JSON in 8.0.13: https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html (thanks @longwave for this info).
The bad news is that according to the docs...
The BLOB, TEXT, GEOMETRY, and JSON data types can be assigned a default value only if the value is written as an expression, even if the expression value is a literal:
This is permitted (literal default specified as expression):
CREATE TABLE t2 (b BLOB DEFAULT ('abc'));
This produces an error (literal default not specified as expression):
CREATE TABLE t2 (b BLOB DEFAULT 'abc');
So we're going to need to fix up \Drupal\Core\Database\Driver\mysql\Schema::createFieldSql() to cope with this.
Do something like...
// Create the table.
$table_specification = [
'description' => 'Test table.',
'fields' => [
'column1' => [
'type' => 'int',
'default' => NULL,
],
'column2' => [
'type' => 'text',
'default' => 'a literal value',
],
],
];
$schema->createTable('test table', $table_specification);
Fix up \Drupal\Core\Database\Driver\mysql\Schema::createFieldSql() to cope with this.
Determine what to do about MySQL 5.7. Default values on text fields is supported by the other db engines we support.
Active
10.1 ✨
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Ran into this issue today where contrib module tailwindcss_utility
uses a blob for a column. See
🐛
MySQL 8.0 support
Fixed
.