
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-codeInstalls 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- Correlation Tracing429
- Synthetic Monitoring427
- Canary Deployment426
- Service Mesh Implementation426
- Azure Functions424
- Data Replication Setup424
- Graphql Implementation424
- Polyglot Integration424
- Distributed Tracing418
- Multi Cloud Strategy418
- Anomaly Detection
- Causal Inference
- Classification Modeling
- Clustering Analysis
- Cohort Analysis
- Computer Vision
- Correlation Analysis
- Data Cleaning Pipeline
- Data Visualization
- Dimensionality Reduction
- Exploratory Data Analysis
- Feature Engineering
- Funnel Analysis
- ML Model Explanation