Skip to content

feat: Supabase migration SQL for 6 config tables#606

Merged
codercatdev merged 3 commits intodevfrom
feat/config-supabase-tables
Mar 5, 2026
Merged

feat: Supabase migration SQL for 6 config tables#606
codercatdev merged 3 commits intodevfrom
feat/config-supabase-tables

Conversation

@codercatdev
Copy link
Contributor

Supabase Migration SQL — 6 Config Tables

Creates supabase/migrations/003_config_tables.sql with all 6 singleton config tables for the Config-to-Supabase spec (MBYYpe5Y).

Tables

Table Columns Key Defaults
pipeline_config 8 gemini_model, quality_threshold=50, visibility='private'
remotion_config 6 aws_region, timeout=240s, memory=2048MB
content_config 6 8 RSS feeds (jsonb), Cleo Abram system instruction
sponsor_config 4 cooldown=14d, 3 rate card tiers, email template
distribution_config 4 notification emails, YouTube template + tags
gcs_config 2 bucket + project ID

Features

  • RLS: service_role SELECT/UPDATE, anon blocked (12 policies)
  • Singleton: CHECK (id = 1) constraint on all tables
  • Defaults seeded: INSERT with ON CONFLICT DO NOTHING (idempotent)
  • Table comments: COMMENT ON TABLE for dashboard display
  • Idempotent: IF NOT EXISTS + ON CONFLICT DO NOTHING
  • Auto timestamps: updated_at trigger on all tables
  • Type-aligned: JSONB defaults match lib/types/config.ts interfaces
    • rss_feeds: {name, url}[] matches ContentConfig
    • rate_card_tiers: {name, description, price}[] matches SponsorConfig

Depends on

  • lib/config.ts + lib/types/config.ts (already on dev via @dashboard's 89434c05)

Task

Closes Phase A task hDHIl0dJ

Miriad and others added 3 commits March 5, 2026 05:21
Co-authored-by: content <content@miriad.systems>
- IF NOT EXISTS on all CREATE TABLE
- ON CONFLICT DO NOTHING on all INSERTs
- Fix aws_region default to 'us-east-1' (was redacted by sandbox)
- Fix bucket_name default to 'codingcatdev-content-engine' (was redacted)
- Add COMMENT ON TABLE for dashboard display

Co-authored-by: content <content@miriad.systems>
- rss_feeds: change from string[] to {name, url}[] to match ContentConfig
- rate_card_tiers: change from {name, price, impressions} to
  {name, description, price} to match SponsorConfig
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
codingcat-dev Ignored Ignored Mar 5, 2026 5:29am

@codercatdev codercatdev merged commit 74288d8 into dev Mar 5, 2026
2 of 3 checks passed
@codercatdev codercatdev deleted the feat/config-supabase-tables branch March 5, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant