See What Changed in the Dolt Workbench

WORKBENCH
3 min read

The Dolt Workbench is an open-source SQL workbench supporting MySQL, Postgres, Dolt, and Doltgres databases. Recently, we've been working on improving the workbench's support for Dolt-specific features such as testing, merge conflict resolution, and other version control capabilities. In this article, we'll discuss some enhancements that better reflect the state of working changes in the workbench.

Including the Working Set in the Workbench

Per the official Dolt documentation, the working set is the set of changes to your database that have not been staged or committed. For those unfamiliar with the Git version control paradigm, this blog is a good introduction to Dolt's working set.

For the purposes of the workbench, our goal is to retrieve changes made since the most recent commit and expose them throughout the workbench's default interfaces. Specifically, we want information related to newly added or modified rows to appear in places such as the table selector and table data views. Luckily, Dolt provides multiple mechanisms to obtain this data.

Table Status

When you make a change to a table in a Dolt database, the first interesting piece of data that Dolt tracks for you is the type of change that was made at the table level. The dolt_status system table stores this information, and it can be queried like any other database table.

select * from dolt_status;
+-------------------+--------+-----------+
| table_name        | staged | status    |
+-------------------+--------+-----------+
| boxes             |      0 | new table |
| audio_path        |      0 | modified  |
| bays              |      0 | deleted   |
| blocks            |      0 | modified  |
| blocks_challenges |      0 | modified  |
+-------------------+--------+-----------+

In the workbench, this status data is now reflected visually in the left side panel containing the tables in your database.

Table Status

For those that use Visual Studio Code, this interface might look familiar. Tables that have been modified since the last commit are highlighted in yellow, and those that have been newly created are green. The "M" and "U" stand for "modified" and "untracked", respectively. After making a Dolt commit, the highlighting disappears since the working set is now clean.

Row Diffs

While the table status information is helpful, it's often more useful to see exactly what data has changed. For this, Dolt creates a system table for each user table that shows more granular diffs at the row level. These tables are accessible by prefixing your table name with dolt_diff_.

select * from dolt_diff_blocks where to_commit = 'WORKING';
+-------+-----------------------+--------------------------------------+-----------+----------------+---------+-----------------------+-----------------------+----------------------------------+-------------------------+-----------+
| to_id | to_title              | to_dashed_name                       | to_commit | to_commit_date | from_id | from_title            | from_dashed_name      | from_commit                      | from_commit_date        | diff_type |
+-------+-----------------------+--------------------------------------+-----------+----------------+---------+-----------------------+-----------------------+----------------------------------+-------------------------+-----------+
|     2 | applied-visual-design | applied-visual-design-1              | WORKING   | NULL           |       2 | applied-visual-design | applied-visual-design | 8okm6t5ptbsac8kj7ehmb79et0hkedbc | 2025-10-03 18:55:20.256 | modified  |
|     9 | basic-data-structures | basic-data-structures-and-algorithms | WORKING   | NULL           |       9 | basic-data-structures | basic-data-structures | 8okm6t5ptbsac8kj7ehmb79et0hkedbc | 2025-10-03 18:55:20.256 | modified  |
|   194 | math                  | math                                 | WORKING   | NULL           |    NULL | NULL                  | NULL                  | 8okm6t5ptbsac8kj7ehmb79et0hkedbc | 2025-10-03 18:55:20.256 | added     |
+-------+-----------------------+--------------------------------------+-----------+----------------+---------+-----------------------+-----------------------+----------------------------------+-------------------------+-----------+

In the query above, we're explicitly specifying the to_commit column as WORKING, allowing us to pull only the rows that exist in the working set. In the workbench, the default table view now shows what rows have changed, with modified rows in yellow and new rows in green.

Row Diff

If you want to see the full table diff with your working changes, statistics, and previous row data, you can select the "Uncomitted Changes" option next to the "Create Commit" button to quickly pull up the diff viewer.

Diff View

Conclusion

We have a lot of ideas on how to make Dolt's version control features more readily apparent in the workbench. Some of these include filtering by changed rows, showing previous row diffs in the table view, and even improving performance on dolt_query_diff. If you'd like to see any of these in the future, or if you have more ideas, come by our Discord and let us know!

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt

Or join our mailing list to get product updates.