add_column
Add a new column to an existing Deriva table, specifying data type, nullability, default value, and comment.
Instructions
Add a new column to an existing table.
Args: table_name: Name of the table to modify. column_name: Name for the new column. column_type: Data type - one of "text", "int2", "int4", "int8", "float4", "float8", "boolean", "date", "timestamp", "timestamptz", "json", "jsonb", "markdown" (default: "text"). nullok: Whether NULL values are allowed (default: True). default: Default value for new rows (optional). comment: Description of the column (optional).
Returns: JSON with status, table_name, column_name, column_type.
Example: add_column("Subject", "Age", "int4", nullok=True, comment="Subject age in years")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nullok | No | ||
| comment | No | ||
| default | No | ||
| table_name | Yes | ||
| column_name | Yes | ||
| column_type | No | text |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |