Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
spences10 avatar

Migration Patterns

  • 1 installs
  • 6 repo stars
  • Updated August 3, 2026
  • spences10/devhub-crm

Provides SQLite migration patterns with numbered SQL files, IF NOT EXISTS idempotency, and a paired schema.sql update.

About

Documents a dual-file SQLite migration workflow with zero-padded numbered migrations and matching schema.sql updates. A developer uses it when creating or modifying database schema.

  • Dual approach: create a numbered migration and update schema.sql
  • Always uses IF NOT EXISTS and never modifies committed migrations

Migration Patterns by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #770 of 911 Databases skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/spences10/devhub-crm --skill migration-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars6
Last updatedAugust 3, 2026
Repositoryspences10/devhub-crm

What it does

Provides SQLite migration patterns with numbered SQL files, IF NOT EXISTS idempotency, and a paired schema.sql update.

Files

SKILL.mdMarkdownGitHub ↗

Migration Patterns

Quick Start

-- migrations/001_add_tags.sql
-- Migration: Add Tags Feature
-- Created: 2025-01-15
-- Description: Adds tags table for organizing contacts

CREATE TABLE IF NOT EXISTS tags (
  id TEXT PRIMARY KEY,
  user_id TEXT NOT NULL,
  name TEXT NOT NULL,
  color TEXT NOT NULL,
  created_at INTEGER NOT NULL,
  updated_at INTEGER NOT NULL,
  FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE
);

CREATE INDEX IF NOT EXISTS idx_tags_user_id ON tags(user_id);

Core Principles

  • Dual approach: Create migration in migrations/ + update

schema.sql

  • Naming: {number}_{description}.sql (e.g., 001_add_tags.sql)
  • Zero-padded numbers: 001, 002, 003 (run alphabetically)
  • IF NOT EXISTS: Always use for idempotency
  • One feature per migration: Keep focused
  • Include indexes: Add in same migration as tables
  • Never modify: Once committed, create new migration instead

Reference Files

  • migration-guide.md - Complete

workflow and examples

  • troubleshooting.md - Common issues

<!-- PROGRESSIVE DISCLOSURE GUIDELINES:

  • Keep this file ~50 lines total (max ~150 lines)
  • Use 1-2 code blocks only (recommend 1)
  • Keep description <200 chars for Level 1 efficiency
  • Move detailed docs to references/ for Level 3 loading
  • This is Level 2 - quick reference ONLY, not a manual

LLM WORKFLOW (when editing this file): 1. Write/edit SKILL.md 2. Format (if formatter available) 3. Run: claude-skills-cli validate <path> 4. If multi-line description warning: run claude-skills-cli doctor <path> 5. Validate again to confirm -->

Related skills

Databasesdatabases

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.