> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ChangeColumnType

> Change a column's type, converting every existing value. The column keeps its id and name.  DescribeDatabase lists each column's `safeTypes` (every value converts) and `checkedTypes` (each value is checked first). Any other type is refused while the column holds values; an empty column takes any type. If a value does not fit ("soon" as a number), or a multi-valued cell would lose values to a single-valued type, nothing changes and the error counts the misfits and quotes a few: fix them with UPDATE and retry, or add a new column. Clear values only when the user asked for that.  - `entity` needs `specificEntityType`: `USER` makes a person column; `DOCUMENT`, `TASK` and the rest reference other Macro items. - `linkToTableId` (with `dataType: entity`) makes a relation to rows of another table of this database. Relations are always multi-valued, and the column must be empty. - Converting to `select` or `tag` turns the distinct existing values into options; `options` adds labels no row has yet. `tag` columns are always multi-valued.  Requires edit access. The response is the schema after the change.

# ChangeColumnType

Change a column's type, converting every existing value. The column keeps its id and name.

DescribeDatabase lists each column's `safeTypes` (every value converts) and `checkedTypes` (each value is checked first). Any other type is refused while the column holds values; an empty column takes any type. If a value does not fit ("soon" as a number), or a multi-valued cell would lose values to a single-valued type, nothing changes and the error counts the misfits and quotes a few: fix them with UPDATE and retry, or add a new column. Clear values only when the user asked for that.

* `entity` needs `specificEntityType`: `USER` makes a person column; `DOCUMENT`, `TASK` and the rest reference other Macro items.
* `linkToTableId` (with `dataType: entity`) makes a relation to rows of another table of this database. Relations are always multi-valued, and the column must be empty.
* Converting to `select` or `tag` turns the distinct existing values into options; `options` adds labels no row has yet. `tag` columns are always multi-valued.

Requires edit access. The response is the schema after the change.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `databaseId` | string | Yes | Id of the database containing the column, from ListDatabases. |
| `tableId` | string | Yes | Id of the table containing the column, from DescribeDatabase. |
| `columnId` | string | Yes | Id of the column to change, from DescribeDatabase. |
| `dataType` | `"text"` \| `"number"` \| `"boolean"` \| `"date"` \| `"link"` \| `"select"` \| `"select_number"` \| `"tag"` \| `"entity"` | Yes | The value type of a column, as the model names it.  A deliberate mirror of \[`DataType`] rather than a re-export: the property system's names are internal, and the tool vocabulary has to stay stable independently of them. |
| `isMultiSelect` | boolean | No | True if a cell can hold several values (select, select\_number, entity, link). Defaults to false. |
| `options` | string\[] | No | For select, select\_number, or tag: labels to accept beyond the values the rows already have. Omit for other types. |
| `specificEntityType` | `"USER"` \| `"DOCUMENT"` \| `"TASK"` \| `"COMPANY"` \| `"CALL_RECORD"` \| `"CHANNEL"` \| `"CHAT"` \| `"PROJECT"` \| `"THREAD"` \| `"CALENDAR_EVENT"` \| `"INITIATIVE"` | No | Required for dataType entity without linkToTableId: what the ids reference, e.g. USER or DOCUMENT. |
| `linkToTableId` | string | No | Id of a table of this database to relate to; makes the column a relation holding row ids. Requires dataType entity. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.