Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tablepro.app/llms.txt

Use this file to discover all available pages before exploring further.

Table Structure

Browse columns, indexes, foreign keys, and DDL for any table. Edit structure visually or with SQL.
Table Structure
Click a table in the sidebar, then click the Structure tab. Or right-click a table > Show Structure.

Columns Tab

Columns tab
PropertyDescription
NameColumn name
TypeData type (VARCHAR, INT, etc.)
NullableWhether NULL values are allowed
DefaultDefault value if none specified
Primary KeyWhether the column is part of the primary key
Auto IncAUTO_INCREMENT / SERIAL
CommentColumn comment
CharsetCharacter set (MySQL/MariaDB only)
CollationCollation (MySQL/MariaDB only)
Use the filter field at the top to search columns by name. Click any column header to sort.

Indexes Tab

Indexes tab
PropertyDescription
NameIndex name
ColumnsColumns included in the index. MySQL prefix lengths shown as col(10)
TypeBTREE, HASH, FULLTEXT, GIN, GIST, BRIN, etc.
UniqueWhether the index enforces uniqueness
ConditionWHERE clause for partial indexes (PostgreSQL)

Add and Drop Indexes

Click + to add a new index, - or Delete to mark an index for removal. Multi-column indexes are supported by adding multiple column entries to one index row.
  • Partial indexes (PostgreSQL): enter a WHERE predicate in the Condition field. The generated DDL emits CREATE INDEX ... WHERE ....
  • Prefix length (MySQL/MariaDB): append (N) to the column entry, for example email(20). Useful for TEXT and long VARCHAR columns.
  • Index type: pick from the type dropdown. Available types depend on the database (BTREE everywhere, GIN/GIST/BRIN on PostgreSQL, FULLTEXT/SPATIAL on MySQL).
Changes are queued. Click Apply to preview the CREATE INDEX / DROP INDEX statements before executing.

Foreign Keys Tab

Foreign Keys tab
PropertyDescription
NameConstraint name
ColumnsLocal column(s)
Ref TableReferenced table
Ref ColumnsReferenced column(s)
Ref SchemaReferenced schema (for cross-schema references)
On DeleteAction when referenced row is deleted (NO ACTION, CASCADE, SET NULL, SET DEFAULT, RESTRICT)
On UpdateAction when referenced row is updated
On Delete and On Update use dropdown pickers with all standard referential actions.

Add and Drop Foreign Keys

Click + to add a new foreign key, - or Delete to remove one. The local and referenced columns use dropdowns populated from the live schema, so typos surface as missing entries rather than runtime errors.
  • Cross-schema references: pick a different schema in the Ref Schema column for PostgreSQL or MySQL. The generated DDL qualifies the referenced table (other_schema.other_table).
  • Composite foreign keys: add multiple column pairs to a single FK entry.
  • Referential actions: configure ON DELETE and ON UPDATE per FK.
Changes are queued. Apply to preview the generated ALTER TABLE ... ADD CONSTRAINT / DROP CONSTRAINT SQL.

Primary Keys

Mark one or more columns as primary key in the Columns tab by toggling the Primary Key flag. Multiple flagged columns produce a composite primary key. The generated DDL emits a single PRIMARY KEY (col1, col2) clause. Changing a primary key on an existing table executes as a drop-and-add sequence. SQLite and ClickHouse do not support modifying primary keys without recreating the table: TablePro disables the action on those databases.

Table Options (MySQL/MariaDB)

The Columns tab toolbar exposes table-level Charset and Collation pickers for MySQL and MariaDB. Changes generate ALTER TABLE ... CONVERT TO CHARACTER SET ... and update the table’s default collation. Per-column overrides remain available in the column detail panel.

DDL Tab

DDL tab
The DDL view uses tree-sitter syntax highlighting with line numbers. Use the toolbar buttons to:
  • Copy the DDL to clipboard
  • Export as a .sql file
  • Open in Editor to send the DDL to a new query tab for editing

Creating a New Table

Right-click in the sidebar and select Create New Table…. A visual editor opens with:
  • Table Name field and database-specific options (Engine, Charset, Collation for MySQL/MariaDB)
  • Columns tab - define columns with name, type, nullable, default, primary key, auto increment, and comment
  • Indexes tab - add indexes with type (BTREE, HASH, FULLTEXT, SPATIAL) and uniqueness
  • Foreign Keys tab - define relationships with referenced tables, ON DELETE/ON UPDATE actions
  • SQL Preview tab - live-generated CREATE TABLE DDL with syntax highlighting
Click Create Table (or Cmd+Return) to execute. The new table appears in the sidebar immediately.
Supported databases: MySQL, MariaDB, PostgreSQL, SQLite, SQL Server, ClickHouse, and DuckDB. Each generates database-specific DDL syntax.

Modifying Structure

Structure modifications alter your database schema. Always backup important data before making changes.

Database Support

Not all databases support every ALTER TABLE operation. TablePro disables unsupported actions in the UI.
OperationMySQL / MariaDBPostgreSQLSQLiteClickHouseSQL ServerDuckDBOracle
Add columnYesYesYesYesYesYesYes
Modify columnYesYesRename onlyYesYesYesYes
Drop columnYesYesYesYesYesYesYes
Add / drop indexYesYesYesYesYesYesYes
Add / drop FKYesYes--YesYesYes
Modify PKYesYes--YesYesYes
Reorder columnsYes------
Cassandra supports add and drop column only. MongoDB structure is read-only. Redis, Etcd, and DynamoDB do not have table schemas.

Visual Structure Editor

Adding Columns

  1. Open Structure > Columns, click +
  2. Set properties: name, type, nullable, default, auto-increment, comment
  3. Click the Type cell to open the type picker. Browse by category or search. For parametric types (VARCHAR(255), DECIMAL(10,2)), type directly in the freeform field.
  4. Click Apply to preview and execute
Adding a new column in Structure editor

Modifying Columns

Click a column, edit properties in the detail panel, then Apply to preview the ALTER TABLE SQL. Changes support undo/redo.

Removing Columns

Select the column, click - or press Delete, confirm, then apply.
Type picker popover

Context Menu

Right-click any row in the Columns, Indexes, or Foreign Keys tabs:
ActionDescription
Copy NameCopy the item name to clipboard
Copy DefinitionCopy the SQL definition
Copy AsCopy as CSV, JSON, or SQL INSERT
Open [table](Foreign Keys tab) Navigate to the referenced table
DuplicateDuplicate selected items
DeleteMark items for deletion (apply to execute)
Multi-select rows to copy or delete multiple items at once.

Schema Change Preview

Before applying, TablePro shows the generated ALTER TABLE SQL for review.
Schema change preview with ALTER TABLE statements
Destructive changes (dropping columns, changing data types) show a confirmation dialog before executing. Cmd+Z to undo, Cmd+Shift+Z to redo structure changes before applying. Schema changes are recorded in query history.
Undo and redo for structure changes

Reordering Columns

Drag a column row up or down in the Columns tab to change its position. The reorder executes immediately as an ALTER TABLE ... MODIFY COLUMN ... AFTER statement.
Column reordering is only available for MySQL and MariaDB. Other databases do not support changing column order without recreating the table.
Drag is disabled when you have unsaved structure changes. Apply or discard pending changes first. For changes unsupported by the visual editor, use the SQL editor directly.

Refreshing Structure

Right-click the table > Refresh, or use View > Refresh. Changes made in TablePro refresh automatically.

MongoDB Collections

The structure tab for MongoDB is read-only. TablePro infers the schema by sampling documents. Three columns are shown:
  • Name: Field name (including nested paths with dot notation)
  • Type: BSON type (ObjectId, String, Int32, Int64, Double, Boolean, Date, Array, Object, etc.)
  • Nullable: Whether the field is present in all sampled documents

Indexes

MongoDB indexes are shown as createIndex() commands that can be copied and run in mongosh.

DDL Tab

Shows index definitions as db.collection.createIndex() statements, collection validators as db.runCommand({collMod: ...}), and collection options (capped, size, max) if applicable.
MongoDB is schema-less, so structure modification is not available. Edit documents directly in the data grid.