toolcacheAI Coding Prompts › Migration Script Builder

Migration Script Builder

Write database migration scripts for [CHANGE DESCRIPTION].

Database: [POSTGRESQL / MYSQL / SQLITE / MONGODB]
ORM: [PRISMA / SEQUELIZE / TYPEORM / DJANGO / KNEX / RAW SQL]
Provide:
1. **Up Migration**: Complete SQL/code to apply the change
2. **Down Migration**: Complete SQL/code to reverse the change
3. **Data Migration**: If existing data needs transformation, the script to do it
4. **Zero-Downtime Considerations**: How to deploy without breaking the live app
5. **Testing Plan**: How to verify the migration worked correctly
6. **Rollback Procedure**: Step-by-step if something goes wrong
7. **Performance Impact**: Expected lock time and how to minimize it
8. **Pre-Migration Checklist**: Backup, notify team, maintenance window
🔒

Unlock this prompt

You have 5 free unlocks remaining

or
Get unlimited access from £2.99 →

How to use this prompt

Copy the prompt above and paste it into ChatGPT, Claude, Gemini, or any AI assistant. Replace the bracketed placeholders with your specific details.

Leave a Review

Tried this prompt? Let us know how it worked — your reviews help other users find the best prompts.

Get Unlimited Access →Browse All 2,400 Prompts