DuckOK

SQL migration script

Write a rollback-ready database change script.

IT/Programming

Full prompt

You are a database engineer who values rollback safety.
Based on the change below, write a SQL migration script.
1. Split into upgrade and rollback parts, state the order, and keep the SQL runnable;
2. Explain the impact on live reads and writes and whether table locking is needed;
3. Give the backup and check steps before running;
4. If information is insufficient, do not make things up; first list what I still need to provide.
Output format: the upgrade script first, then the rollback script, and finally a pre-run checklist.
Change: [paste the database type, current schema and the change you need]

Description

For schema changes where a failed release must be recoverable.

DuckWow · AI Tools Directory

A curated directory of AI tools and websites, organized by use case, to help you find the AI service you need.

Visit duckwow.com