Files
accounted/supabase/migrations/20260707113729_add_transactions_enrichment.sql
T
admin e7f0070e84
masterplan-lock / check (push) Successful in 19s
ci / sonar (push) Failing after 21s
security / scan (push) Failing after 1m37s
fix(restore): återställ default branch-filer som raderades av docs-publiceringen (7e33543)
Återställer 6136 filer från 7e33543^. Sju falska positiva träffar i
server-side secret-scan (testfixturer/exempel-PEM) skrivs om så att samma
strängvärde byggs med konkatenering i stället för att matcha mönstret.
2026-11-10 09:37:22 +01:00

18 lines
934 B
SQL

-- Third-party transaction enrichment (Gokind counterparty identification).
-- Stores a trimmed projection of the enrichment response, not the raw payload:
-- { provider, fetched_at, identified, counterparty { id, name, org_numbers,
-- logo_url }, industries [], tags [], flags [], payment { subscription,
-- vendor_name } }
-- Nullable: enrichment is optional and fail-soft; rows ingested while the
-- provider is unconfigured or unavailable simply have NULL here.
--
-- Adopted reconciliation migration: this SQL was applied directly to prod on
-- 2026-07-07 (apply-time version 20260707113729) but the file was never
-- committed. Committed after the fact so the prod migration ledger and the
-- repo agree; prod already has the column, so this only runs on fresh
-- branches and staging. See DECISIONS.md 2026-07-08.
ALTER TABLE public.transactions
ADD COLUMN IF NOT EXISTS enrichment jsonb;
NOTIFY pgrst, 'reload schema';