Tabellum for desktop · Chapter 7
The schema designer
The designer is a canvas for changing a schema the way you would draw it: add tables, drag foreign keys between columns, edit types and constraints. Nothing touches the database until you click Apply, and then you see every statement first. A design is a file in designs/.
7.1 Starting a design#
Click + next to DESIGNS in the sidebar.

- Where the design starts from
- Create a new database instead
Under Start from 1, choose:
- Connection — the database’s schemas as they are now. Applied back to the same database, nothing changes until you edit something.
- Snapshot — a saved snapshot, to build on it or bring a database back to it.
- Design — a copy of another design.
- Empty — a blank schema.
Create a new database 2 makes the design create its database first; you choose its name, the server it is created on and its options.
7.2 The canvas#

- The connection Apply runs on
- Add a table, view, function…
- Reload the design from the database
- Apply the changes
- The selected object
- 1 is the connection Apply runs on.
- 2 adds a table, view, materialized view, function, procedure, sequence or enum type — what the database supports.
- Drag a table to move it. Drag from a column’s port (the ring at its edge) onto another table’s column to create a foreign key. Double-click empty canvas to add a table there, or a table to open it full-screen.
- The inspector 5 edits what you selected: name, comment, columns with their types and defaults, keys, foreign keys, checks and indexes, and shows the SQL for that object.
- Cmd+Z undoes and Cmd+Shift+Z redoes any change, including moves.
- Auto-layout arranges the canvas; Columns shows or hides the columns.
Tables marked new or changed differ from the database; a red dashed table is one the database has and the design does not, which Apply would drop.
7.3 Reviewing and applying#
The Changes drawer under the canvas is always up to date: how many statements Apply would run, what it would drop, any warnings, and the statements themselves.

Click Apply 4 in the canvas picture. The statements open in the approval dialog and run in one transaction where the database allows it.

The code button next to Apply opens the same script in a query tab instead, to run it yourself or keep it.
7.4 When the database has changed#
If someone changed the database after you made the design — a migration, a new table — Apply would undo their change. Two buttons bring the design up to date:
- Reload from the database 3 reads the database again, lists what your design would lose, and replaces the design with the database’s schema. Table positions are kept, and Cmd+Z brings your version back.
- Take from the database, in the inspector of a table marked changed, replaces that one table with the database’s version and keeps the rest of your design.
7.5 Full-screen editors#
Double-click an object (or use the arrow button in the inspector) to open it in its own tab. On the left is its definition, on the right a preview: sample rows, the query plan, or the SQL that would run.

- Back to the canvas
- Preview rows, plan or SQL
Canvas 1 goes back to the design. Rows, Plan and SQL 2 switch the preview.
7.6 Creating a database#

On PostgreSQL you choose the owner, template, encoding and collation; on MySQL the character set and collation; on SQL Server the owner and collation. Without a server, the new database is an SQLite file in the workspace.

