create_database_schema
Create a complete database schema from a JSON specification, including tables, columns, relationships, and domains. Supports dry-run for preview and atomic rollback on failure.
Instructions
Create a whole database schema in one call from a JSON spec: {tables:[{name, code, comment, columns:[{name, code, data_type, length, precision, mandatory, default_value, comment, primary}], indexes:[...]}], relationships:[{parent_table, child_table, parent_columns, child_columns, name, cardinality}], domains:[...], indexes:[...]}. Primary keys are derived from columns with primary:true (or primary_key_columns). dry_run=true returns the execution plan without touching the model; atomic=true (default) rolls the model back if any step fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | ||
| atomic | No | ||
| dry_run | No | ||
| model_id | Yes |