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
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
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.