You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: MySQL datetime with precision fails with CURRENT_TIMESTAMP default #277
`created_at` datetime (6) NOT NULL DEFAULT CURRENT_TIMESTAMP
SQLSTATE[42000]: 1067 Invalid default value for 'created_at'
MySQL requires the default to have the same precision as the column: DEFAULT CURRENT_TIMESTAMP(6). MySQLColumn renders DATETIME_NOW without it. The same happens with #[Column(type: 'datetime(6)')] on a field managed by CreatedAt / UpdatedAt from cycle/entity-behavior.
Reproduced on MySQL 8.0.37 with cycle/database 2.10.0 and 2.23.3.
Activity