← Back to list

supabase-migration
by Smarter-Poker
Smarter-Poker-World-Hub
⭐ 0🍴 0📅 Jan 26, 2026
SKILL.md
name: Supabase Migration description: Create and run Supabase database migrations with proper RLS policies
Supabase Migration Skill
Overview
This skill helps create and execute Supabase database migrations with proper Row Level Security (RLS) policies.
When to Use
- Creating new tables
- Adding columns to existing tables
- Setting up RLS policies
- Running migrations in production
Instructions
1. Create Migration File
Create SQL migration in /supabase/migrations/YYYYMMDD_description.sql:
-- ═══════════════════════════════════════════════════════════════════════════
-- MIGRATION: [Description]
-- ═══════════════════════════════════════════════════════════════════════════
-- Create table
CREATE TABLE IF NOT EXISTS public.table_name (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Enable RLS
ALTER TABLE public.table_name ENABLE ROW LEVEL SECURITY;
-- Create policies
CREATE POLICY "Public read access" ON public.table_name
FOR SELECT USING (true);
2. Run Migration
Use browser agent to execute SQL in Supabase dashboard:
- Navigate to
/sql/new - Inject SQL via Monaco editor
- Click Run and confirm
3. Verify
Check Security Advisor at /advisors/security for any new issues.
Policy Templates
Public Read
CREATE POLICY "Public read access" ON public.table_name
FOR SELECT USING (true);
User Owned
CREATE POLICY "Users manage own data" ON public.table_name
FOR ALL USING (auth.uid() = user_id);
System Managed
CREATE POLICY "System manages data" ON public.table_name
FOR ALL USING (true);
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon