Skip to content

P1: profiles + decks migrations + RLS + deckRepository #464

Description

@Doberjohn

Cloud deck storage with owner-scoped RLS.

Scope

  • Migration profiles (id → auth.users, handle unique-nullable, display_name, avatar_url), RLS public-read/owner-write + handle_new_user() signup trigger.
  • Migration decks (id, owner_id, name, gameplan text?, inks text[] ≤2, cards jsonb = [{cardId,quantity,isCore}], is_public default false, slug unique) + updated_at trigger; RLS select using (is_public or auth.uid()=owner_id), insert/update/delete owner-only.
  • deckRepository.ts CRUD (guarded by getSupabase()).
  • Regenerate database.types.ts; run pnpm test:supabase + get_advisors.

Part of #451 · Deck Builder & Engine Score milestone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    deck-builderDeck builder + advisor + Engine Score initiativeinfrastructureBuild, deploy, analytics, DevOps

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions