Recompute a merge from the schemas as they are now
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.
Authorization
bearer In: header
Path Parameters
Database id
uuidMerge id
uuidRequest Body
application/json
Optional; an empty body is {}
TypeScript Definitions
Use the request body type in TypeScript.
Use the target's current schema as the base (a two-way diff), when the base is gone.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/merges/497f6eca-6276-4993-bfeb-53cbbbba6f08/recompute" \ -H "Content-Type: application/json" \ -d '{}'{ "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "database": "string", "direction": "into_parent", "error": "string", "failed_phase": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "rebaselined": true, "source_branch_id": "345f76de-8f9d-4a8f-b08e-a28a3db17483", "status": "computing", "target_branch_id": "2a8880d3-8c08-4fef-81e0-ec9d6c6def29", "updated_at": "2019-08-24T14:15:22Z", "version": 0}Export a merge's plan as SQL GET
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.
Rehearse a draft merge POST
Runs the plan on a throwaway branch of the target (real data, so a failing constraint shows) and compares the result with the merged schema. Needs a `draft` with a plan and no open conflicts. Success makes the merge `rehearsed`; a failure returns it to `draft` with the failing step and the Postgres error in `rehearsal`. Send the `version` you last saw: the rehearsal then runs that draft.