Skip to main content
Creates a table in a project. Auxilian adds id (uuid primary key) and created_at (timestamptz, defaults to the insert time) automatically. Don’t include them in columns.

Parameters

string
required
Project id from list_projects. You need write access.
string
required
Table name. Lowercase letters, digits, and underscores, starting with a letter or underscore, at most 63 characters, and not starting with proj_. See Naming rules.
object[]
required
One to 50 columns.
object[]
Foreign keys from uuid columns in this table to the id of another table. See Foreign keys.

Result

The new table’s definition, including the system columns. Same shape as the describe_table result.

Example

Arguments
Result

Errors

Notes

  • Columns can’t have unique constraints, check constraints, or indexes beyond the id primary key.
  • Foreign keys can only be added here, when the table is created. add_column can’t add one later.