Skip to Content
Data VaultTablesCreate tables

Create tables

By the end of this page you will have created a table, chosen its primary key style, added a column with a foreign key, and know how to drop a table safely.

Prerequisites

  • Admin or Developer role. Viewers can browse tables but not change them.
  • A project open in the Studio. Open Data Vault → Tables.
💡

Prefer to describe your data in plain language? The Data Assistant can create tables and generate sample data for you, with an approval step before anything runs.

Create a table

Open the create dialog

In the Tables list on the left, click the + button (or Create Table on the empty state). The Create Table dialog opens.

Name the table

Enter a Table Name in snake_case (for example customers). The Display Name is filled in for you and can be edited, and you can add an optional Description.

Create Table dialog with table name, display name, and description fields

(Optional) Set advanced options

Expand Advanced Options to choose:

  • Primary Key TypeUUID (universally unique), Auto Increment (1, 2, 3…), or Prefixed (for example INC000001, with a prefix, digit count, and start value).
  • Audit Columnscreated_at, updated_at, created_by, updated_by. On by default.
Create Table advanced options showing primary key type and audit columns toggle
ℹ️

In the Shared schema, a subscription_id column and a Row-Level Security policy are added automatically for tenant isolation — you don’t configure this.

Create

Click Create Table. The new table appears in the list, ready for columns and data.

Add and remove columns

Every table starts with its primary key (and audit columns, if you kept them). Add your own columns from the table’s settings.

Open Table Settings

Select a table, open its menu, and choose Settings. The Table Settings panel opens with the Columns list.

Add a column

Click Add Column and fill in:

  • Column Namesnake_case.
  • Data Type — Text, Varchar(255), Integer, Big Integer, Numeric, Boolean, Timestamp, Timestamp with TZ, Date, UUID, or JSONB.
  • Default Value (optional).
  • Allow NULL values — on by default.
Add Column form with column name, data type, default value, and allow-null toggle

(Optional) Make it a foreign key

Turn on Foreign Key Reference to link the column to another table. Choose the Referenced Table (your project tables, plus the system users table) and Referenced Column — the column’s data type is set automatically to match. Then pick the On Delete and On Update actions: No Action, Cascade, Set Null, Set Default, or Restrict.

Foreign Key Reference configuration with referenced table, referenced column, and on-delete/on-update actions
⚠️

Adding a NOT NULL foreign key to a table that already has rows will fail. Keep Allow NULL values on, or give the column a default that exists in the referenced table.

Remove a column

Click the trash icon next to a column and confirm Drop Column. This permanently deletes the column and its data. System columns (id, subscription_id, and the audit columns) can’t be removed.

ℹ️

System-managed tables (such as the users cache) show a lock badge and a “System-managed table — schema modifications are disabled” banner. You can browse them, but not change their schema.

Drop a table

To remove a table, open its menu and choose Drop Table. You get two choices:

  • Unregister only (the default) — removes qRaptor’s registration but leaves the actual table and its data in the database. The confirm button reads Unregister Table.
  • Also delete table data from database — permanently deletes the table and all its rows. The confirm button changes to Delete Permanently. Enable Cascade delete as well to drop foreign-key constraints in other tables that reference this one.
Drop Table dialog with the delete-data and cascade options
🚨

Deleting table data cannot be undone. For safety, hard-deleting a production table that still holds rows is disabled — you can only unregister it.

Common issues

  • “Table name must start with a letter or underscore…” — use snake_case: letters, numbers, and underscores only, starting with a letter or underscore.
  • Adding a column fails on a table with data — a NOT NULL column (especially a foreign key) needs an existing default or must allow NULLs. See the warning above.
  • The schema selector is disabled — your plan includes only the Shared schema. Dedicated schemas are a higher-plan feature.
  • Can’t change a system table — system-managed tables are read-only in schema; this is expected.

Next