aj-geddes avatar

Database Migration Management

This handles the mechanics of database schema evolution with version tracking, rollback capabilities, and migration logging built in. You get reference guides for common operations like adding columns safely, creating indexes without blocking production traffic, and managing data transformations. The approach centers on maintaining a migrations tracking table with checksums and execution metadata, which is pretty much the standard pattern but implemented thoroughly. Most useful when you need to coordinate schema changes across multiple environments or need a clear audit trail of what changed and when. The rollback planning is the standout piece here, since that's what most teams skip until they desperately need it.

skills.sh installs
504
GitHub stars
379
last updated
Aug 21, 2026

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill database-migration-management --agent claude-code

Installs into .claude/skills of the current project.

Files

Database Migration Management

Table of Contents

Overview

Implement robust database migration systems with version control, rollback capabilities, and data transformation strategies. Includes migration frameworks and production deployment patterns.

When to Use

  • Schema versioning and evolution
  • Data transformations and cleanup
  • Adding/removing tables and columns
  • Index creation and optimization
  • Migration testing and validation
  • Rollback planning and execution
  • Multi-environment deployments

Quick Start

Minimal working example:

-- Create migrations tracking table
CREATE TABLE schema_migrations (
  version BIGINT PRIMARY KEY,
  name VARCHAR(255) NOT NULL,
  executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  duration_ms INTEGER,
  checksum VARCHAR(64)
);

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Backend & APIs, AI & Agent Building, Release Management, Productivity & Planning, Databases
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258
1aj-geddes avatarapi-reference-documentationaj-geddes/useful-ai-promptsCreate comprehensive API reference documentation with OpenAPI/Swagger specs, REST endpoints, authentication, examples, and SDKs. Use when documenting REST APIs,499skills.sh installs
2yoanbernabeu avatarsupabase-extract-db-stringyoanbernabeu/supabase-pentest-skillsCRITICAL - Detect exposed PostgreSQL database connection strings in client-side code. Direct DB access is a P0 issue.499skills.sh installs
3next-safe-action avatarsafe-action-better-authnext-safe-action/skillsUse when adding authentication or authorization to safe actions with Better Auth -- covers betterAuth() middleware setup, typed session context (BetterAuthConte496skills.sh installs
4davila7 avatarbackend-dev-guidelinesdavila7/claude-code-templatesComprehensive backend development guide for Node.js/Express/TypeScript microservices. Use when creating routes, controllers, services, repositories, middleware,492skills.sh installs
5aj-geddes avatardatabase-indexing-strategyaj-geddes/useful-ai-promptsDesign and implement database indexing strategies. Use when creating indexes, choosing index types, or optimizing index performance in PostgreSQL and MySQL.491skills.sh installs
6auth0 avatarauth0-aspnetcore-apiauth0/agent-skillsUse when protecting ASP.NET Core Web API endpoints with JWT Bearer token validation, scope checks, or DPoP binding. Integrates Auth0.AspNetCore.Authentication.A490skills.sh installs