add command to set sql_mode as default by Ubuntu 16.04 (not active)

This commit is contained in:
Uwe Steinmann 2016-08-08 20:28:35 +02:00
parent 229b7e874f
commit d2e959e32e

View File

@ -181,6 +181,8 @@ class SeedDMS_Core_DatabaseAccess {
$this->_conn->exec('SET NAMES utf8');
/* Turn this on if you want strict checking of default values, etc. */
// $this->_conn->exec("SET SESSION sql_mode = 'STRICT_TRANS_TABLES'");
/* The following is the default on Ubuntu 16.04 */
// $this->_conn->exec("SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'");
break;
case 'sqlite':
$this->_conn->exec('PRAGMA foreign_keys = ON');