Skip to content

Instantly share code, notes, and snippets.

@PSF1
Created August 19, 2020 06:50
Show Gist options
  • Save PSF1/83e693ee28a0f5834677785572e7c779 to your computer and use it in GitHub Desktop.
Save PSF1/83e693ee28a0f5834677785572e7c779 to your computer and use it in GitHub Desktop.
Drupal 8+ - Configurar SQL MODE
/**
* Localhost setup.
*/
$databases['default']['default'] = [
'database' => 'db',
'username' => 'db',
'password' => 'db',
'prefix' => '',
'host' => 'mariadb',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
'init_commands' => [
'sql_mode' => "SET sql_mode = 'ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER'",
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment