Problem
The artists table has no updated_at trigger. Every other table that has an updated_at column gets one via update_updated_at_column() — sets, groups, stages, festivals, festival_editions, festival_info, custom_links, artist_notes, soundcloud — but artists was missed.
artists.updated_at has DEFAULT now(), which only applies on INSERT, not UPDATE. As a result, application code has to set updated_at manually on every update (see src/hooks/queries/artists/useUpdateArtist.ts), and any update path that forgets to do so leaves the timestamp stale.
Suggested fix
Add a migration creating the missing trigger, matching the other tables:
CREATE TRIGGER update_artists_updated_at
BEFORE UPDATE ON public.artists
FOR EACH ROW
EXECUTE FUNCTION public.update_updated_at_column();
Once the trigger exists, drop the manual updated_at: new Date().toISOString() line from updateArtist in useUpdateArtist.ts so the DB is the single source of truth.
Context
Came up during PR #34 review. The equivalent redundant line in useUpdateSet.ts was already removed there (the sets table already has its trigger). Tracking the artists trigger separately since it is a schema change unrelated to the db-sync PR.
Problem
The
artiststable has noupdated_attrigger. Every other table that has anupdated_atcolumn gets one viaupdate_updated_at_column()—sets,groups,stages,festivals,festival_editions,festival_info,custom_links,artist_notes,soundcloud— butartistswas missed.artists.updated_athasDEFAULT now(), which only applies on INSERT, not UPDATE. As a result, application code has to setupdated_atmanually on every update (seesrc/hooks/queries/artists/useUpdateArtist.ts), and any update path that forgets to do so leaves the timestamp stale.Suggested fix
Add a migration creating the missing trigger, matching the other tables:
Once the trigger exists, drop the manual
updated_at: new Date().toISOString()line fromupdateArtistinuseUpdateArtist.tsso the DB is the single source of truth.Context
Came up during PR #34 review. The equivalent redundant line in
useUpdateSet.tswas already removed there (thesetstable already has its trigger). Tracking theartiststrigger separately since it is a schema change unrelated to the db-sync PR.