Generate migration SQL
litescope_migrate_diffCompare two database schemas and generate the migration SQL needed to update the old schema to match the new one, without applying changes or analyzing blast radius.
Instructions
Diff two SQLite or D1 databases and return the migration SQL that would bring the 'old' source up to the 'new' schema — without applying it or computing blast-radius. Useful when you only need the SQL to review or pass to litescope_migrate_apply. For a full blast-radius analysis use litescope_migrate_plan. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new | Yes | Target ('after') source with the desired schema — Database source: a local file path (./app.db), a Cloudflare D1 DSN (d1://DB_ID when CLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_ID are set, or d1://TOKEN@ACCOUNT_ID/DB_ID), or a Turso DSN (turso://TOKEN@ORG/DB). | |
| old | Yes | Current ('before') source — Database source: a local file path (./app.db), a Cloudflare D1 DSN (d1://DB_ID when CLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_ID are set, or d1://TOKEN@ACCOUNT_ID/DB_ID), or a Turso DSN (turso://TOKEN@ORG/DB). |