Docs

Table editor

Create and change tables without SQL: columns and types, keys and relationships, row access presets, browsing, filtering, sorting and editing rows, and what happens when a write fails.

Updated Oct 17, 2026Open in console
A table open in the Table EditorA table open in the Table Editor
Table Editor

Create a table

Create a new table panelCreate a new table panel
New table: name, row access presets, columns and foreign keys
  1. New table

    Name it (lowercase, underscores). It starts with id (primary key) and created_at.

  2. Row access

    Pick one or more presets so your app can use the table: Guest read, Guest insert, Signed-in read, Signed-in CRUD, Owner only (each user sees only rows they own), Block guests. Skip this and app users can't use the table until you add a policy — a safe default.

  3. Columns

    Add columns with a type, default, primary key, nullable and unique. Common choices: text, int8, numeric, bool, timestamptz (default now()), uuid (default gen_random_uuid()), jsonb.

  4. Foreign keys

    Link a column to another table's key; choose what happens when the referenced row is deleted.

  5. Save

    The table is created and recorded in version history, so the change can be rolled back.

Browse and edit rows

  • Filter by any column (equals, contains, greater than, is empty…) and Sort by one or more columns; the page shows 100 rows at a time.
  • Insert adds a row with a form that matches each column's type; JSON and arrays get an editor that checks the value.
  • Double-click a cell to edit it; select rows to delete several at once.
  • Row-level security doesn't limit you here: the Table Editor works with your team access.

Change a table

Add, rename or drop columns and change their type from the column menu. Changes on large tables can lock them while they run — for big or risky changes, write a migration and dry-run it first (Migrations).

When a write fails

MessageFix
duplicate key value violates unique constraintAnother row already has that value.
violates foreign key constraintPoint to a row that exists, or delete the dependent rows first.
null value in column … violates not-null constraintFill the required column, or give it a default.
invalid input syntax for type …The value doesn't match the column type (for example text in a number column).

Example: a notes table for signed-in users

  1. Create `notes`

    Columns: owner_id uuid (default auth.uid()), body text not null. Preset: Owner only.

  2. Insert from the app

    Signed-in users insert notes; owner_id fills itself.

    await sovaria.data.sql('insert into notes (body) values ($1)', ['Buy milk'])
    const { rows } = await sovaria.data.sql('select id, body from notes order by id desc')
  3. Check

    Sign in as a second user: they see none of the first user's notes (Security recipes).

Something unclear or missing on this page?Tell us