dev/core#392 Ensure that the log_date column on logging tables is NOT NULL in MySQL 8
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 3 Jan 2020 20:59:01 +0000 (07:59 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 3 Jan 2020 21:11:14 +0000 (08:11 +1100)
CRM/Logging/Schema.php

index 176020b7056ff0d01bce3036170544d78b1056e7..9a8e7133a216cb1f42fa2cf31ec8c0c4fcdd991a 100644 (file)
@@ -774,7 +774,7 @@ WHERE  table_schema IN ('{$this->db}', '{$civiDB}')";
     // rewrite the queries into CREATE TABLE queries for log tables:
     $cols = <<<COLS
             ,
-            log_date    TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+            log_date    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
             log_conn_id VARCHAR(17),
             log_user_id INTEGER,
             log_action  ENUM('Initialization', 'Insert', 'Update', 'Delete')