app:table
Retrieves the definition of a single table within a schema
Retrieves the definition of a single table within a schema
Options
| Name | Type | Description |
|---|---|---|
org_id | string | The organisation ID that scopes the operation |
schema_id | string | The name of the schema (database) that contains the table |
table | string | The name of the table to retrieve |
Outputs
| Name | Type | Description |
|---|---|---|
table | Table | The retrieved table definition |
↳ name | string | Is the table identifier and must be unique within a Schema. |
↳ description | string | Is an optional human-readable summary surfaced in generated documentation and GUI tooling. Has no effect on storage. |
↳ fields | Field | Is the ordered list of user-defined columns on the table. |
↳ name | string | Is the column name. Must be unique within the table and must not collide with reserved record fields (id, created_at, updated_at, deleted_at). |
↳ type | FieldType | Is the field's data type. See the FieldType constants for the supported values. |
↳ required | bool | Marks the field as non-nullable. Inserts and updates that omit a required field (and provide no Default) are rejected. |
↳ default | any | Is the value applied when a record is inserted without an explicit value for this field. A nil or zero value means no default is applied. |
↳ related_table | string | Is the name of the target table for relation fields. Required when Type is has_one, has_many, or belongs_to; ignored otherwise. |
↳ related_field | string | Is the name of the foreign-key field on the related table. Used only by has_many to identify which column on RelatedTable points back to this record. |
↳ description | string | Is a human-readable explanation of the field's purpose. Surfaced in generated documentation and GUI tooling; has no effect on storage or validation. |
↳ indexes | Index | Is the optional list of secondary indexes defined on the table. |
↳ name | string | Is the index identifier and must be unique within its table. |
↳ fields | string | Is the ordered list of field names covered by the index. Order is significant for composite indexes (leftmost-prefix semantics). |
↳ unique | bool | Enforces that no two records share the same value combination for the indexed fields. |
How is this guide?