Tag

invalid default value

1 views collected around this technical thread.

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.

MySQLdatabaseexplicit_defaults_for_timestamp
0 likes · 7 min read
Why MySQL TIMESTAMP Columns May Fail with “cannot be null” After Migration