Docs / Structure, indexes and tools
Structure, indexes and tools
Column editing, index management per engine, and the Tools menu.
Structure
The Structure tab shows names, types, nullability, defaults and primary keys. Rename tables and columns and change types where the engine allows it. Changes are staged, previewed and committed through the same queue as row edits.
- PostgreSQL, MySQL, DuckDB and ClickHouse support column type changes.
- SQLite supports renaming; type changes require a separate table-rebuild migration.
- MongoDB supports collection renaming. Redis has no relational schema editor.
- MySQL DDL executes independently because it cannot roll back atomically with row changes.
Stored functions and macros
The sidebar has a searchable Functions group for PostgreSQL functions and procedures, MySQL stored routines, ClickHouse SQL user-defined functions and DuckDB scalar and table macros. Overload signatures stay visible. SQLite, MongoDB and Redis have no routine catalog, so the group is absent there.
- Select a routine to open its definition with Edit, Save and Cancel. Save writes the definition back and refreshes the sidebar; it never invokes the function. Leaving with unsaved changes asks you to keep editing or discard.
- PostgreSQL keeps the existing parameter signature and uses CREATE OR REPLACE inside a transaction, including SQL-standard BEGIN ATOMIC bodies. ClickHouse uses CREATE OR REPLACE. DuckDB only exposes macro bodies, so you enter the complete CREATE MACRO statement, and saves run in a transaction.
- MySQL validates under a temporary routine name, keeps the creation SQL mode, reads and reapplies routine grants, and tries to restore the original if replacement fails. This needs SELECT on
mysql.procs_priv; MySQL replacement is not transactional. - Saves enforce Edit and No-Edit and read-only restrictions in the backend, reject renamed targets or extra statements, and compare against the definition you opened. Stash covers row data, not routine definitions.
Indexes
SQL connections have Data, Structure and Indexes tabs. Indexes shows the actual catalog: ordered key columns or expressions, index type, uniqueness, primary-key status and the definition. Create, Drop and ClickHouse Materialize enter the pending-changes queue with SQL preview, individual undo and commit.
| Engine | Index behavior |
|---|---|
| SQLite | B-tree indexes including expression and partial definitions. Rowid and constraint autoindexes are protected. |
| PostgreSQL | Catalog indexes with expressions, included columns and predicates. Primary and constraint-owned indexes are protected. Creation uses B-tree. |
| MySQL | Ordered columns, prefix lengths, sort direction, uniqueness and access method. Primary indexes are protected. |
| DuckDB | Explicit ART indexes plus protected primary and unique constraint indexes. |
| ClickHouse | Sparse primary keys are protected. MergeTree tables support minmax, set(100) and bloom_filter(0.01) skipping indexes with granularity 1 to 1024, plus Materialize. |
Index changes and column changes on the same table are committed separately. Drop and Materialize re-validate the catalog snapshot before execution so a stale index is never silently targeted.
Tools menu
- Process List (⌘ .): live app and server processes with cancellation where permissions allow.
- Table Relationships: relationships from actual foreign-key metadata.
- User Management: account catalogs for PostgreSQL, MySQL and ClickHouse with reviewable role-management SQL.
- Search Tables and Columns: a searchable catalog with navigation to matching tables.
- Stash: inspect, copy and open recovery statements.
- Back Up Database: complete native backup to a local gzip archive, with optional S3 upload, for capable adapters.
- Settings (⌘ ,): stash enablement and retention.