Run the after-merge choice of a merge applied with drift
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.
Authorization
bearer In: header
Path Parameters
Database id
uuidMerge id
uuidRequest Body
application/json
The after-merge choice
TypeScript Definitions
Use the request body type in TypeScript.
The after-merge choice run by hand on a merge applied with drift (E21).
What the merge does when it is done with the branch.
Value in
- "keep"
- "reset"
- "delete"
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/finish" \ -H "Content-Type: application/json" \ -d '{ "after": "keep" }'{ "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}Cancel a merge POST
Stops a merge that isn't changing the target: `computing`, `draft`, `rehearsing` (the worker deletes the rehearsal branch; until it is gone the target's reset, restore and delete answer `branch_merge_busy` with `error.rehearsal_branch_id`) or `rehearsed`. An applying merge can't be cancelled, and a merge failed in `online` is abandoned instead.
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.