supabase-setup
Initialize Supabase locally, manage database migrations, and configure Row Level Security. Use when setting up databases, creating tables, or managing schemas.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
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 スキル - セットアップ全体の流れ
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-01-26
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!