Skip to content

infra(assets): 신규 Supabase 프로젝트 + 초기 스키마 #334

@cocoyoon

Description

@cocoyoon

Part of #333.

Scope

assets Supabase 프로젝트(신규 cloud)에 파이프라인 스테이징용 초기 스키마를 배포한다.

Deliverables

  • Supabase dashboard 에서 assets 프로젝트 생성 (region/plan 별도 결정)
  • `supabase-assets/config.toml` (신규 CLI 디렉토리)
  • `supabase-assets/migrations/0001_initial.sql` 작성
    • `public.pipeline_status` ENUM (`NOT_STARTED`, `IN_PROGRESS`, `COMPLETED`, `VERIFIED`, `ERROR`)
    • `public.raw_post_sources` (id, platform, source_type, source_identifier, label, is_active, fetch_interval_seconds, last_enqueued_at, last_scraped_at, initial_scraped_at, metadata, timestamps, UNIQUE (platform, source_type, source_identifier))
    • `public.raw_posts` (id, source_id FK, platform, external_id, external_url, image_url, r2_key, r2_url, image_hash, caption, author_name, status pipeline_status, parse_status, parse_result, parse_error, parse_attempts, verified_at, verified_by (no FK), platform_metadata, dispatch_id, timestamps, UNIQUE (platform, external_id))
    • `public.pipeline_events` (bigserial id, raw_post_id FK CASCADE, from_status, to_status, actor uuid, note, occurred_at)
    • 인덱스: status, (status, updated_at DESC), source_id, dispatch_id, (raw_post_id, occurred_at DESC)
    • RLS 기본 enable (service role만 bypass — 실사용은 api-server/ai-server)

Acceptance

  • `supabase db push --db-url ` 성공
  • service role 커넥션으로 insert/select 정상
  • 스키마 내 warehouse 스키마 없음 (모두 public)

Depends on

  • 없음 (가장 첫 단계)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions