Search

PythonReactSEOPDF
GitHub Skill

supabase-setup

Initialize Supabase locally, manage database migrations, and configure Row Level Security. Use when setting up databases, creating tables, or managing schemas.

ykzts☆ 0 Repository stars0 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

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

参考

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-01-20
Index updated
2026-01-26
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!