Files
accounted/supabase/migrations/20260518130000_agent_profiles_identity.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

21 lines
795 B
SQL

-- Migration: agent_profiles.display_name + avatar_id
--
-- Lets the user name their agent and pick an avatar during Phase B review.
-- The floating FAB and chat surfaces use these to feel personal — "Fråga
-- Anna" instead of the generic "Fråga min revisor".
--
-- Both columns are nullable. The agent UI falls back to:
-- * display_name → "min revisor"
-- * avatar_id → generic Sparkles glyph
--
-- avatar_id is a free-form text key (e.g. "notionists-1") into the static
-- AVATAR_OPTIONS registry in components/agent/avatars.ts. No FK because the
-- registry lives in code — renaming a key means a one-time backfill, not a
-- schema migration.
ALTER TABLE public.agent_profiles
ADD COLUMN display_name text,
ADD COLUMN avatar_id text;
NOTIFY pgrst, 'reload schema';