Commit

37b2cff

While testing a post on updated_at, I ran one routine MySQL migration and the column stopped updating. No error, no warning. The statement was ALTER TABLE orders MODIFY updated_at with a new default. MODIFY replaces the whole column definition, and I had not repeated ON UPDATE CURRENT_TIMESTAMP, so MySQL removed it. It is why Schemity restates the clause in every MODIFY it writes. Old rows keep their times, so nothing looks wrong until someone asks why an order edited yesterday says it last changed in March. https://schemity.com/blog/auto-update-updated-at-column-mysql-postgres-orm/
schemity.comHow to Auto-Update an updated_at Column: MySQL ON UPDATE vs a Database Trigger vs the ORM - SchemityMySQL ON UPDATE, a trigger or the ORM for updated_at: Schemity compares them, the migrations that silently break each, and the writes an ORM never sees.

commit 37b2cff