AI Blocks › Build and ship software
Database migration writer
Describe the schema change. Get a versioned migration that runs forward and rolls back safely.
Database migration writer is a free AI skill for the job "Build and ship software". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · MIT licence · Made by Burhan Sebin
Made by Burhan Sebin. See the original on GitHub; we copied it as it is, with its licence.
What it does
A tested schema change that moves your database forward and can roll back cleanly if it goes wrong. It aims for no downtime on production. You describe the change. The skill sorts it as safe additive or breaking, then picks your tool: Alembic, Prisma Migrate, Flyway, Knex, Django or Sequelize. It generates the migration from the schema diff, reviews it and writes the downgrade by hand. Data backfills are handled in steps. It tests on a staging copy, then rolls out using expand and contract: add new columns first, switch the app to write to both, then remove the old ones later. After deploy it checks migration status and watches logs.
You give it
- The schema change you want
- Your migration tool or stack
- Database type
- Table size (optional)
You get
- Forward migration script
- Rollback script
- Backfill steps
- Staged rollout plan
Use it when
- You need to add a column to a busy production table.
- You are renaming a field without breaking the live app.
- You need a rollback plan before releasing a schema change.
- You must backfill old rows with new values.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can run code and read your project files.