← スキル一覧に戻る

apply-migration
by Acurioustractor
⭐ 0🍴 0📅 2026年1月22日
SKILL.md
name: apply-migration description: Apply SQL migration files to JusticeHub Supabase database with verification and error handling.
Apply Database Migration
Invocation: /apply-migration <migration-file>
Usage
/apply-migration 20260102_alma_unification_links.sql
How It Works
- Reads migration from
supabase/migrations/ - Connects to Supabase using
.env.localcredentials - Executes SQL via direct PostgreSQL connection
- Verifies created tables/columns
- Logs success/failure
Prerequisites
.env.localwithNEXT_PUBLIC_SUPABASE_URL,SUPABASE_DB_PASSWORD- Migration file in
supabase/migrations/ pglibrary installed
Connection
postgresql://postgres:PASSWORD@HOST:6543/postgres
Fallback to session pooler if direct fails.
Success Output
✅ Migration executed successfully!
🔍 Verifying tables...
✅ article_related_interventions
✅ alma_intervention_profiles
🎉 Migration Complete!
Failure Output
❌ Error: syntax error at or near "CRATE"
📋 Manual alternative:
1. Open Supabase Dashboard → SQL Editor
2. Copy from: supabase/migrations/bad_migration.sql
3. Fix syntax and run
Safety Features
- Transaction safety
- Idempotent checks (
IF NOT EXISTS) - Proper connection cleanup
- Backup reminder
Files
- Script:
scripts/apply-migration-skill.mjs - Migrations:
supabase/migrations/*.sql
Related
/create-migration- Generate new migration/verify-schema- Check database schema
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓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
レビュー
💬
レビュー機能は近日公開予定です