Cursor

SQL Migration Script Writer

Prompt
Act as a database migration specialist. Write an idempotent SQL migration for [schema change] with rollback script, index creation strategy, data backfill steps, and zero-downtime deployment considerations for PostgreSQL.

How to use this prompt

  1. Copy the prompt above using the copy button

  2. Open Cursor and start a new conversation

  3. Paste the prompt and replace [bracketed variables] with your specifics

Look for [placeholder] text in the prompt — replace these with your specific details for best results.

Related Topics

1,369 copies222 upvotes