Update Schema
update_schemaUpdate a project's schema (saves to database, does NOT deploy).
⚠️ CRITICAL: Follow ALL rules from create_project: • FLAT format (no 'fields' nesting) • string: MUST have max_length • decimal: MUST have precision + scale • Use "datetime" NOT "timestamp" • DON'T define: id, created_at, updated_at • NEVER create users/customers/employees tables (use app_users)
⚠️ MIGRATION RULES: • New fields MUST be "required": false OR have "default" value • Cannot add required field without default to existing tables • Safe: {new_field: {type: "string", max_length: 100, required: false}}
WORKFLOW:
Use get_schema to see current schema
Modify following ALL rules
(optional) Call update_schema with dry_run=true to preview the migration first
Call update_schema (saves only)
Call deploy_staging to apply changes
Monitor with get_job_status
DRY RUN: pass dry_run=true to preview what a deploy WOULD change — renames, drops, creates — without saving or deploying anything. The response flags destructive operations (dropped tables/columns) so you can review before applying.
NOTE: Without dry_run this only saves the schema. You MUST call deploy_staging afterwards to apply changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | Yes | New JSON schema in FLAT format (table_name → field_name → properties). Every field MUST have a 'type' property. | |
| dry_run | No | Preview the planned migration (renames/drops/creates) without saving or deploying. Nothing is applied. | |
| project_id | Yes | Project ID (UUID) |