最近在移轉系統時發現一些 timestamp 欄位的資料欄位都無法寫入,出現column ‘timestamp’ cannot be null,上網查詢發現是因為資料庫格式檢查為嚴僅模式,解決的方式也很簡單改一個參數值即可。
指令:SET GLOBAL explicit_defaults_for_timestamp = OFF;
最近在移轉系統時發現一些 timestamp 欄位的資料欄位都無法寫入,出現column ‘timestamp’ cannot be null,上網查詢發現是因為資料庫格式檢查為嚴僅模式,解決的方式也很簡單改一個參數值即可。
指令:SET GLOBAL explicit_defaults_for_timestamp = OFF;