Database Migration Script Writer
By Cameron Chen · Published · Updated
Generate SQL or ORM migration scripts for schema changes.
Tags: coding, database, migration
Prompt template
## Introduction Generate a safe, reversible database migration script for your schema changes. ## Database Details - Database System: [dropdown: PostgreSQL, MySQL, SQLite, MSSQL, MongoDB (schema migration), Other] - ORM/Framework: [dropdown: Raw SQL, Prisma, Drizzle, Knex.js, Alembic (Python), ActiveRecord (Rails), None] - Migration Type: [dropdown: Add column, Rename column, Drop column, Add table, Drop table, Add index, Add foreign key, Data transformation] ## Migration Details - Table Name: [text: The table being modified] - Change Description: [textarea: Describe exactly what needs to change and why] - Current Schema (optional): [textarea: Paste the current CREATE TABLE or schema definition] ## Safety Options - Include rollback (down migration): [toggle: Yes, No] - Add data validation before migration: [toggle: Yes, No] - Wrap in transaction: [toggle: Yes, No]