dolthub / hosted-issues

Issues for hosted.doltdb.com
https://hosted.doltdb.com
2 stars 0 forks source link

Need way to reset working changes from workbench #91

Closed tbantle22 closed 1 year ago

tbantle22 commented 1 year ago

We determine the current branch for the workbench based on the branch in the url, so calling dolt_checkout(branch) or use db/branch from the workbench sql console will not work. However, there needs to be an easier way to clear working changes from the workbench (does not seem like dolt_checkout(table) works)

An ideal solution is probably adding a button that handles this for the user, similar to being able to delete a workspace on dolthub

tbantle22 commented 1 year ago

This currently doesn't work due to https://github.com/dolthub/dolt/issues/5816

tbantle22 commented 1 year ago

There is now a UI for resetting uncommitted changes from the workbench. If you click on the arrow next to Create commit you will get this modal which will show all tables with uncommitted changes

Screen Shot 2023-05-24 at 11 32 53 AM

Clicking on Unstage will execute a call dolt_reset(<tablename>) query. Clicking on Restore will restore the table changes to the current HEAD. We cannot execute call dolt_checkout(<tablename>) from the sql editor to accomplish this due to the above issue, but we found a workaround that is handled for you by the graphql server