name: supabase-setup description: Initialize Supabase locally, manage database migrations, and configure Row Level Security. Use when setting up databases, creating tables, or managing schemas. metadata: author: Bingify version: "1.0"
Supabase Setup & Database Management
このスキルは、Bingifyプロジェクトのデータベース初期化とマイグレーション管理をカバーします。
概要
BingifyはSupabaseをバックエンドデータベースとして使用します。ローカル開発ではSupabase CLIで完全なPostgreSQLの環境を提供します。
ローカルセットアップ
Supabaseの起動
ローカル開発環境の完全なセットアップ:
pnpm local:setup
詳細は development スキル を参照してください。
Supabase Studioへのアクセス
http://localhost:54323
PostgreSQLへのアクセス
- Host: localhost
- Port: 5432
- User: PostgreSQL
- Password: PostgreSQL
- Database: PostgreSQL
マイグレーション管理
重要ルール
既存のマイグレーションファイルを編集してはいけません。
変更が必要な場合は、新しいマイグレーションを作成してください。
マイグレーション作成
supabase migration new migration_name
マイグレーション適用
supabase db push
マイグレーション確認
supabase migration list
RLSポリシー
-- ユーザー自身のデータのみ表示
CREATE POLICY "Users can view own data"
ON public.users
FOR SELECT
USING (auth.uid() = id);
-- 認証済みユーザーのみ挿入可能
CREATE POLICY "Authenticated users can insert"
ON public.spaces
FOR INSERT
WITH CHECK (auth.role() = 'authenticated');
データシード
supabase seed run
シードスクリプト: supabase/seed.sql
参考
- docs/MIGRATIONS.md - マイグレーション運用ガイド
- development スキル - セットアップ全体の流れ
chat Comments (0)
Sign in to join the discussion and leave a comment.
Skill Details
GitHub Stars
0
GitHub Forks
0
Created
Jan 2026
Last Updated
5 months ago
tools
tools database tools
Related Skills
Build your own?
Join 12,000+ developers contributing to the Claude ecosystem.
No comments yet. Be the first to share your thoughts!