Tables & Columns
Tables are the core building blocks of your ERD. Each table has a name, optional schema prefix, columns with types and constraints, and visual properties like header color.
Add a table
There are several ways to create a new table:
- Open the Tables tab in the left sidebar and click the + button
- Right-click on empty canvas space and choose New Table from the context menu
- Use the keyboard shortcut for new table
A new table appears on the canvas with a default name, and the edit panel opens on the right so you can start configuring it immediately.
Edit a table
Click any table on the canvas to select it. The edit panel opens on the right with these fields:
| Field | Description |
|---|---|
| Name | The table name (e.g., users, orders) |
| Schema | Optional schema prefix (e.g., public, auth) |
| Note | Freeform description or documentation for the table |
| Header Color | Color picker to visually categorize tables on the canvas |
Changes to table properties are saved automatically as you type.
Columns
Add a column
In the edit panel, scroll to the Columns section and click + Add Column. A new row appears with fields for name, type, and constraints.
Edit a column
Click on any column row in the edit panel to expand its properties:
| Property | Description |
|---|---|
| Name | Column name (e.g., id, email, created_at) |
| Type | Data type — type freely or pick from the autocomplete dropdown (e.g., int, varchar, timestamp) |
| PK | Primary Key constraint |
| NOT NULL | Marks the column as required |
| Unique | Adds a unique constraint |
| Auto Increment | Auto-incrementing value (for integer PKs) |
| Default | Default value expression (e.g., 0, now(), 'active') |
| Note | Inline comment for the column |
Toggle constraints by clicking the corresponding checkbox or badge.
Reorder columns
Drag the handle on the left side of each column row to reorder. The display order on the canvas updates to match.
Delete a column
Click the delete icon on the right side of a column row to remove it.
Column badges
The column list in the edit panel (and on the canvas) shows visual badges:
| Badge | Meaning |
|---|---|
| PK | This column is a primary key |
| FK | This column is referenced by a foreign key relationship |
These badges help you quickly identify key columns without opening the full column editor.
Delete a table
You can delete a table in two ways:
- Keyboard: Select the table on the canvas and press Delete or Backspace
- Edit panel: Open the table's edit panel and click the Delete button at the bottom
Deleting a table also removes all relationships (foreign keys) connected to it. This action cannot be undone except through Version History.
Tips
- Use schema prefixes to organize tables by domain (e.g.,
billing.invoices,auth.sessions) - Set distinct header colors for different modules — this makes large diagrams easier to scan
- The note field supports documentation that travels with the table — use it for design decisions, constraints, or migration notes
- Column order matters for readability — put the primary key first, then foreign keys, then domain fields, then timestamps