-- ═══════════════════════════════════════════════════════════════ -- FRONT PAGE updated_at -- -- Same rule as the other touch triggers in 002: an UPDATE that -- doesn't set updated_at itself gets it set, which is what the -- admin engine's optimistic concurrency compares against. On its -- own because the migration runner may drop anything that follows -- a BEGIN...END body. -- ═══════════════════════════════════════════════════════════════ CREATE TRIGGER front_page_touch AFTER UPDATE ON front_page FOR EACH ROW WHEN new.updated_at = old.updated_at BEGIN UPDATE front_page SET updated_at = datetime('now') WHERE id = new.id; END;