Export a merge's plan as SQL
The final plan as a .sql file: phase headers as comments, the plan's transaction in BEGIN/COMMIT starting with SET LOCAL lock_timeout and statement_timeout from the merge's options (its stale guard and recovery marker are left out), the online phase marked "run outside a transaction", roles as comments (never passwords). Never cached.
Authorization
bearer In: header
Path Parameters
Database id
uuidMerge id
uuidResponse Body
text/plain
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/merges/497f6eca-6276-4993-bfeb-53cbbbba6f08/plan.sql""string"Run the after-merge choice of a merge applied with drift POST
A merge whose target doesn't read back as merged ends `applied_with_drift` without running its after-merge choice (`result.after.skipped`). Once you've looked at the drift, this runs it: `keep` (the merge becomes the branch's base, if the source is still the schema that was merged; otherwise `result.after.base` is `not_advanced`), `reset` or `delete` of the source branch, with their usual refusals recorded in `result.after`. Only once per merge; an update from the parent only keeps. The merge stays `applied_with_drift`; `result.after` holds `requested: true` until the worker records the outcome.
Recompute a merge from the schemas as they are now POST
From `draft`, `stale` or `failed` (not a failure in the online phase: retry that one). The worker reads both schemas again and returns a new draft that keeps the resolutions whose conflicts are unchanged. `rebaseline: true` uses the target's current schema as the base when the real one is gone (`merge_base_unavailable` in `error`): every difference then counts as a source change, so the target's own recent changes show as things to undo.