← スキル一覧に戻る

migration
by vneseyoungster
ChocoVine turns "Vibes Coding" into Engineering. It stops hallucinations by enforcing a strict Research → Test → Code loop.
⭐ 23🍴 17📅 2026年1月23日
SKILL.md
name: migration description: Create reversible database migrations with rollback scripts. Use when modifying database schemas.
Migration Skill
Purpose
Create safe, reversible database migrations.
Migration Template
Use: templates/migration-template.sql
-- Migration: [description]
-- Created: [date]
-- Author: [name]
-- ==================== UP ====================
BEGIN;
-- Your migration here
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) NOT NULL UNIQUE,
created_at TIMESTAMP DEFAULT NOW()
);
COMMIT;
-- ==================== DOWN ====================
BEGIN;
DROP TABLE IF EXISTS users;
COMMIT;
Pre-Migration Checklist
Use: checklists/pre-migration.md
- Down migration works
- Tested on production-like data
- Performance impact assessed
- Backup plan documented
- Deployment timing considered
Migration Types
Safe Migrations
- Add table
- Add nullable column
- Add index (CONCURRENTLY)
- Add foreign key (without validation)
Risky Migrations
- Drop table (verify no references)
- Drop column (verify no usage)
- Rename column (may break app)
- Change column type (may lose data)
Dangerous Migrations
- Truncate table
- Drop database
- Remove constraints
Large Table Migrations
For tables with >1M rows:
- Create new structure
- Backfill in batches
- Add constraints
- Switch over
- Clean up old structure
Rollback Strategy
- Test down migration before running up
- Document manual rollback steps
- Have production backup
- Consider feature flags for code changes
スコア
総合スコア
70/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
✓フォーク
10回以上フォークされている
+5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です
