Skip to main content

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
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:
  1. Double-click the cell
  2. Enter the new value
  3. Press Enter to confirm or Escape to cancel
Modified cells
Changing a value back to its original automatically removes it from the queue.

Adding Rows

To insert a new row:
  1. Click the + button in the toolbar or use the keyboard shortcut
  2. A new row appears at the bottom of the data grid, marked with an insertion indicator
  3. Fill in the values for each column
  4. 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.
Newly added row with insertion indicator

Deleting Rows

To delete rows:
  1. Select one or more rows in the data grid
  2. Press the Delete key or click the delete button
  3. Deleted rows are marked with a strikethrough indicator
Deleted rows stay visible until you commit or discard.
Deleted row with deletion indicator
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 TypeSQL Generated
Cell editUPDATE ... SET column = ? WHERE pk = ?
Row insertionINSERT INTO ... (columns) VALUES (?)
Row deletionDELETE 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.
Commit and Discard buttons with pending changes count

Undo & Redo

ActionShortcut
UndoCmd+Z
RedoCmd+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

OperationWhat Is Tracked
Add columnNew column definition (name, type, nullable, default, etc.)
Modify columnOld and new column definitions
Delete columnColumn marked for removal
Add indexNew index definition (name, columns, type, uniqueness)
Modify indexOld and new index definitions
Delete indexIndex marked for removal
Add foreign keyNew FK definition (columns, references, actions)
Modify foreign keyOld and new FK definitions
Delete foreign keyFK marked for removal
Modify primary keyOld 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
Schema changes highlighted in Structure tab

Previewing Schema SQL

Before applying schema changes, preview the generated SQL:
1

Make Changes

Add, modify, or delete columns, indexes, or foreign keys in the Structure tab
2

Click Commit

Click the Commit button or press Cmd+S
3

Review SQL

A preview sheet shows all ALTER TABLE statements that will execute
4

Apply or Cancel

Click Apply Changes to execute, or Cancel to go back and adjust
Schema Preview
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:
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