Tagged articles
3 articles
Page 1 of 1
Aikesheng Open Source Community
Aikesheng Open Source Community
Nov 3, 2021 · Databases

Why MySQL TIMESTAMP Columns May Fail with “cannot be null” After Migration

The article explains how MySQL's explicit_defaults_for_timestamp setting and strict SQL mode cause TIMESTAMP columns with default CURRENT_TIMESTAMP to produce "Invalid default value" errors during migration from 5.7.28 to 5.7.20, especially when synchronization tools omit NULL and DEFAULT attributes.

explicit_defaults_for_timestampinvalid default valuemigration
0 likes · 7 min read
Why MySQL TIMESTAMP Columns May Fail with “cannot be null” After Migration
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 26, 2021 · Databases

Understanding MySQL explicit_defaults_for_timestamp and Its Impact on TIMESTAMP Columns

This article explains how the MySQL system variable explicit_defaults_for_timestamp controls the default and NULL handling of TIMESTAMP columns, demonstrates the differences between OFF and ON settings with practical tests, and discusses why the parameter is being deprecated for stricter time‑data management.

NULLSQLdatabase migration
0 likes · 10 min read
Understanding MySQL explicit_defaults_for_timestamp and Its Impact on TIMESTAMP Columns