Databases

Plan a database schema promotion

Compares a ready branch schema against the production database schema, records a schema-only promotion plan, validates generated SQL on a temporary provider branch, and returns the persisted plan. It never copies branch data to production.

post/api/v1/databases/{databaseId}/branches/{branchId}/schema-promotions

Request

  • Base URL
    https://app.khotan.com
  • URL
    https://app.khotan.com/api/v1/databases/{databaseId}/branches/{branchId}/schema-promotions
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Path parameters

databaseIdstring required
branchIdstring required

Response

The persisted promotion plan. Status is ready only when SQL validation passes and no blocked changes exist.

idstring required
databaseIdstring required
branchIdstring required
status'planning' | 'ready' | 'blocked' | 'applying' | 'applied' | 'failed' required
sourceSchemaHashstring required
targetSchemaHashstring required
sqlstring required
failedStatementIndexinteger nullable required
createdAtstring required
updatedAtstring required
validatedAtstring nullable required
appliedAtstring nullable required
failedAtstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.