Generate safe database migration scripts with rollback support
Generate a database migration script for the following change: Current Schema: ```sql [PASTE CURRENT SCHEMA OR DESCRIBE IT] ``` Desired Change: [DESCRIBE THE SCHEMA CHANGE NEEDED] Database: [PostgreSQL/MySQL/SQL Server] Migration Tool: [Prisma/Knex/TypeORM/Flyway/Raw SQL] Data Preservation: [YES/NO - existing data considerations] Please provide: 1. Up migration script 2. Down migration script (rollback) 3. Data migration steps if needed 4. Pre-migration validation checks 5. Post-migration verification queries 6. Estimated migration time and locking considerations
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[PASTE CURRENT SCHEMA OR DESCRIBE IT][DESCRIBE THE SCHEMA CHANGE NEEDED]