Skip to content

[#330] Add RLS SELECT policies for trade_history tables #338

@realproject7

Description

@realproject7

Context

trade_history, backfill_failures, and backfill_cursor tables have RLS enabled but no SELECT policy. The browser-side anon Supabase client returns empty arrays, which breaks the PriceChart component.

Scope

Create migration supabase/migrations/00018_rls_public_read.sql:

-- trade_history: public read for price charts
create policy "Public read" on public.trade_history for select using (true);

-- backfill_failures: public read for diagnostics
create policy "Public read" on public.backfill_failures for select using (true);

-- backfill_cursor: public read for status checks
create policy "Public read" on public.backfill_cursor for select using (true);

Acceptance Criteria

  • Migration file created and applies cleanly
  • npm run typecheck passes
  • PriceChart shows trade data when trade_history has rows

Labels

agent/T3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions