feat(phase1): ad_channels 테이블 + admin CRUD API
- Migration: ad_channels table (uuid, name, url, status, memo) - Routes: GET/POST /api/admin/ad-channels (list/create) - Routes: PATCH/DELETE /api/admin/ad-channels/[id] (update/delete) - Auth: admin_token verification via verifyAdminTokenNode - RLS: service_role only, no additional policies Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
12
supabase/migrations/2026-07-02-phase1-ad-channels.sql
Normal file
12
supabase/migrations/2026-07-02-phase1-ad-channels.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS ad_channels (
|
||||
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name text NOT NULL,
|
||||
url text,
|
||||
status text NOT NULL DEFAULT 'active' CHECK (status IN ('active','paused')),
|
||||
memo text,
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
ALTER TABLE ad_channels ENABLE ROW LEVEL SECURITY;
|
||||
-- service_role(관리자 API)만 접근 — 별도 policy 없음(기본 거부)
|
||||
Reference in New Issue
Block a user