akb_alter_table
Modify a table's schema by adding, removing, or renaming columns, plus add or drop indexes and unique keys.
Instructions
Modify a table's schema — add, remove, or rename columns via ALTER TABLE DDL. Requires admin role.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | Table URI — akb://{vault}[/coll/{coll_path}]/table/{name} | |
| add_columns | No | Columns to add | |
| add_indexes | No | Lookup indexes to add: [{name?, columns}]. A column is a bare string or {name, order} (order 'asc'|'desc'). | |
| drop_columns | No | Column names to remove | |
| drop_indexes | No | Index names to drop (as shown in indexes metadata). | |
| rename_columns | No | Rename columns: {old_name: new_name} | |
| add_unique_keys | No | UNIQUE keys to add: [{name?, columns}]. Adding a key on a table with existing data preflights for duplicate rows and fails before any DDL if any are found. | |
| drop_unique_keys | No | UNIQUE-key names to drop (as shown in unique_keys metadata). |