Drop Tables or Fields
drop_schema_itemsDrop tables or fields from a project's saved schema (saves to database, does NOT deploy). DESTRUCTIVE: the next deploy drops their data.
OPERATIONS (applied in order and all together): • {"op": "drop_table", "table": "clocks"} • {"op": "drop_field", "table": "parameters", "field": "is_clock"}
A drop that cannot be applied (a table or field that is not there, a schema the deploy would refuse, such as a field another reads) refuses them all, naming it, and nothing is saved. The answer carries 'applied', 'diff', 'plan' and the new 'version'.
WORKFLOW:
preview_schema_change with the same operations: check 'diff' and 'plan'
drop_schema_items (pass expected_version to be refused if someone else saved meanwhile)
deploy_staging refuses the plan and names its drops; deploy_destructive applies it, then get_job_status
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operations | Yes | The drops: drop_table(table) and drop_field(table, field) operations, applied in order and all together. | |
| project_id | Yes | Project ID (UUID) | |
| expected_version | No | The 'version' a get_schema read answered. The drop is refused (409) when the saved schema changed since. |