Files
brokeless/supabase/migrations/0032_consent_until.sql
T
MangaValkandClaude Opus 5.5 514b2aac77 Enable Banking: warn before the bank's permission runs out, and link again cleanly
- save when the permission ends (consent_until, migration 0032)
- Accounts warns two weeks ahead, says Needs attention once it ran out, and offers
  Link again; an expired or revoked session no longer shows a raw API error
- accounts and rows are keyed on identification_hash, which stays the same across
  links (the uid doesn't), so linking again adds no copies and keeps edits
- links made with the per-link uid move to the stable key on their next sync
- linking the same bank again replaces the old connection

Tested against the stand-in: first link, moving old IDs, linking again,
the warning and an expired permission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:23:49 +01:00

5 lines
333 B
SQL

-- When the bank's permission for a feed connection runs out (Enable Banking: at most 180 days for most banks).
-- The Accounts page warns before then and asks to link again after.
alter table public.plaid_items add column if not exists consent_until timestamptz;
grant select (consent_until) on public.plaid_items to authenticated;