Change Tracking
Changes in TablePro are queued in memory, not applied immediately. Edit cells, insert rows, delete rows, then review everything before committing. Nothing touches the database until you say so.
Change tracking is per-tab. Switching tabs preserves your edits.
Data Changes
TablePro tracks three types of data changes: cell edits, row insertions, and row deletions.
Editing Cells
To edit an existing cell:
- Double-click the cell
- Enter the new value
- Press
Enter to confirm or Escape to cancel
Changing a value back to its original automatically removes it from the queue.
Adding Rows
To insert a new row:
- Click the + button in the toolbar or use the keyboard shortcut
- A new row appears at the bottom of the data grid, marked with an insertion indicator
- Fill in the values for each column
- Columns with default values are pre-filled with
DEFAULT
Edits to cells in a new row are folded into the insertion, not tracked as separate updates.
Deleting Rows
To delete rows:
- Select one or more rows in the data grid
- Press the
Delete key or click the delete button
- Deleted rows are marked with a strikethrough indicator
Deleted rows stay visible until you commit or discard.
Batch deletion of multiple rows is tracked as a single undo action. Undoing a batch deletion restores all rows at once.
Commit & Discard
Committing Changes
Click Commit or press Cmd+S. TablePro generates parameterized SQL, executes it, clears the queue, and refreshes the grid.
Generated SQL:
| Change Type | SQL Generated |
|---|
| Cell edit | UPDATE ... SET column = ? WHERE pk = ? |
| Row insertion | INSERT INTO ... (columns) VALUES (?) |
| Row deletion | DELETE FROM ... WHERE pk = ? |
UPDATE statements require a primary key on the table. If no primary key is defined, TablePro shows an error when you try to commit updates. DELETE statements can work without a primary key by matching all column values.
Discarding Changes
Click Discard to revert all pending changes. Modified cells return to their original values, inserted rows are removed, and deleted rows are unmarked. This also clears the undo/redo stack.
Previewing Data SQL
Click the Preview SQL button (eye icon) or press Cmd+Shift+P to see the exact SQL before committing. Use Copy All to copy to clipboard.
The preview inlines parameter values so you can verify exactly what will run. Destructive operations are highlighted with a warning banner.
Undo & Redo
| Action | Shortcut |
|---|
| Undo | Cmd+Z |
| Redo | Cmd+Shift+Z |
Context-aware: Cmd+Z undoes text edits when the SQL editor is focused, data changes when the grid is focused.
Stacks are per-tab. Committing or discarding clears both stacks.
Schema Changes
Table structure changes (columns, indexes, foreign keys) use the same queue-based approach.
Tracked Schema Operations
| Operation | What Is Tracked |
|---|
| Add column | New column definition (name, type, nullable, default, etc.) |
| Modify column | Old and new column definitions |
| Delete column | Column marked for removal |
| Add index | New index definition (name, columns, type, uniqueness) |
| Modify index | Old and new index definitions |
| Delete index | Index marked for removal |
| Add foreign key | New FK definition (columns, references, actions) |
| Modify foreign key | Old and new FK definitions |
| Delete foreign key | FK marked for removal |
| Modify primary key | Old and new primary key columns |
Visual Indicators
- New items: highlighted with an insertion color
- Modified items: changed fields are marked
- Deleted items: shown with a deletion indicator
Previewing Schema SQL
Before applying schema changes, preview the generated SQL:
Make Changes
Add, modify, or delete columns, indexes, or foreign keys in the Structure tab
Click Commit
Click the Commit button or press Cmd+S
Review SQL
A preview sheet shows all ALTER TABLE statements that will execute
Apply or Cancel
Click Apply Changes to execute, or Cancel to go back and adjust
Copy individual SQL statements from the preview sheet using the copy button next to each statement.
SQL Generation
Data changes use parameterized statements. Schema changes produce database-specific ALTER TABLE statements:
MySQL/MariaDB
PostgreSQL
SQLite
UPDATE `users` SET `name` = ? WHERE `id` = ? LIMIT 1
INSERT INTO `users` (`name`, `email`) VALUES (?, ?)
DELETE FROM `users` WHERE `id` = ? OR `id` = ?
ALTER TABLE `users` ADD COLUMN `phone` VARCHAR(20) NOT NULL
ALTER TABLE `users` MODIFY COLUMN `name` VARCHAR(200) NOT NULL
UPDATE "users" SET "name" = $1 WHERE "id" = $2
INSERT INTO "users" ("name", "email") VALUES ($1, $2)
DELETE FROM "users" WHERE "id" = $1 OR "id" = $2
ALTER TABLE "users" ADD COLUMN "phone" VARCHAR(20) NOT NULL
ALTER TABLE "users" ALTER COLUMN "name" TYPE VARCHAR(200)
UPDATE "users" SET "name" = ? WHERE "id" = ?
INSERT INTO "users" ("name", "email") VALUES (?, ?)
DELETE FROM "users" WHERE "id" = ?
ALTER TABLE "users" ADD COLUMN "phone" TEXT
CREATE INDEX "idx_email" ON "users" ("email")
SQLite has limited ALTER TABLE support. Use the SQL editor for modifications that require table recreation.