migration-patterns
About
This skill provides SQLite database migration patterns for creating schema changes and running database updates. It offers practical guidance on migration file naming, idempotent SQL practices, and maintaining both migration files and schema definitions. Use it when creating new migrations, modifying existing schemas, or executing database changes in SQLite projects.
Documentation
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/+ updateschema.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
Quick Install
/plugin add https://github.com/spences10/devhub-crm/tree/main/migration-patternsCopy and paste this command in Claude Code to install this skill
GitHub 仓库
Related Skills
csv-data-summarizer
MetaThis skill automatically analyzes CSV files to generate comprehensive statistical summaries and visualizations using Python's pandas and matplotlib/seaborn. It should be triggered whenever a user uploads or references CSV data without prompting for analysis preferences. The tool provides immediate insights into data structure, quality, and patterns through automated analysis and visualization.
hybrid-cloud-networking
MetaThis skill configures secure hybrid cloud networking between on-premises infrastructure and cloud platforms like AWS, Azure, and GCP. Use it when connecting data centers to the cloud, building hybrid architectures, or implementing secure cross-premises connectivity. It supports key capabilities such as VPNs and dedicated connections like AWS Direct Connect for high-performance, reliable setups.
llamaindex
MetaLlamaIndex is a data framework for building RAG-powered LLM applications, specializing in document ingestion, indexing, and querying. It provides key features like vector indices, query engines, and agents, and supports over 300 data connectors. Use it for document Q&A, chatbots, and knowledge retrieval when building data-centric applications.
Excel Analysis
MetaThis skill enables developers to analyze Excel files and perform data operations using pandas. It can read spreadsheets, create pivot tables, generate charts, and conduct data analysis on .xlsx files and tabular data. Use it when working with Excel files, spreadsheets, or any structured tabular data within Claude Code.
