fix(sync): add updated_at to sl_tags so tag renames and deletions reach the app #188

Closed
maximus wants to merge 4 commits from issue-181-tag-updated-at into issue-180-tag-link-sync

4 commits

Author SHA1 Message Date
le king fu
8678775340 Merge branch 'issue-180-tag-link-sync' into issue-181-tag-updated-at 2026-11-03 21:13:20 -05:00
le king fu
9a81322527 Merge branch 'issue-180-tag-link-sync' into issue-181-tag-updated-at 2026-11-03 20:42:41 -05:00
le king fu
acaad3ba6a test(sync): give the migration backfill test room to boot its own PGlite
Refs #181

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:38:09 -05:00
le king fu
bb233c8b59 fix(sync): add updated_at to sl_tags so tag renames and deletions reach the app
Migration 0003 adds sl_tags.updated_at (default now(), backfilled from
created_at). Every tag write moves it (PUT/DELETE /api/tags/[id], tag
update/delete in POST /api/sync), and GET /api/sync pulls tags on
updatedAt >= since. Deleting a tag removes its links and moves the
touched tasks' updatedAt in the same transaction, so the app realigns
their links on the next pull.

The user_id ALTERs drizzle-kit re-emitted from the stale 0000 snapshot
are dropped from 0003 (0001 applied them); the new snapshot is current.

Refs #181
Refs #168

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:33:14 -05:00