aj-geddes avatar

Data Migration Scripts

This helps you write database migrations that won't wreck your production data at 2am. It covers schema changes, data transformations, and cross-database moves with built-in rollback capabilities and batch processing for large datasets. The reference guides include working examples for Knex.js and Alembic, plus patterns for zero-downtime deployments using feature flags and backwards-compatible changes. The best practices section is solid on the fundamentals: always write reversible migrations, test on production-like data, use transactions, and never modify old migrations. If you're doing anything beyond trivial schema changes or need to backfill data without taking the site down, this gives you the scaffolding to do it safely.

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

Install

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

Installs into .claude/skills of the current project.

Files

Data Migration Scripts

Table of Contents

Overview

Create robust, safe, and reversible data migration scripts for database schema changes and data transformations with minimal downtime.

When to Use

  • Database schema changes
  • Adding/removing/modifying columns
  • Migrating between database systems
  • Data transformations and cleanup
  • Splitting or merging tables
  • Changing data types
  • Adding indexes and constraints
  • Backfilling data
  • Multi-tenant data migrations

Quick Start

Minimal working example:

import { Knex } from "knex";

Sponsors

Details

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

More from aj-geddes/useful-ai-prompts

All 258
1vm0-ai avatarminimaxvm0-ai/vm0-skillsMiniMax API for AI models. Use when user mentions "MiniMax", "Chinese AI", or asks about MiniMax language models.430skills.sh installs
2aj-geddes avatarsynthetic-monitoringaj-geddes/useful-ai-promptsImplement synthetic monitoring and automated testing to simulate user behavior and detect issues before users. Use when creating end-to-end test scenarios, moni427skills.sh installs
3jezweb avatarflaskjezweb/claude-skillsBuild Python web apps with Flask using application factory pattern, Blueprints, and Flask-SQLAlchemy. Prevents 9 documented errors including stream_with_context426skills.sh installs
4aj-geddes avatarazure-functionsaj-geddes/useful-ai-promptsCreate serverless functions on Azure with triggers, bindings, authentication, and monitoring. Use for event-driven computing without managing infrastructure.424skills.sh installs
5aj-geddes avatarpolyglot-integrationaj-geddes/useful-ai-promptsIntegrate multiple programming languages using FFI, native bindings, gRPC, or language bridges. Use when combining strengths of different languages or integrati424skills.sh installs
6unclecatvn avatarai-vibe-slidesunclecatvn/agent-skillsCreate beautiful, professional HTML or React slide decks ready for fullscreen presentation. Use this skill when the user wants to: create a PPT/slide/presentati424skills.sh installs