spine-tools / Spine-Toolbox

Spine Toolbox is an open source Python package to manage data, scenarios and workflows for modelling and simulation. You can have your local workflow, but work as a team through version control and SQL databases.
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
70 stars 17 forks source link

Commit History Viewer doesn't show parameter or object/relationship data #1996

Open DillonJ opened 1 year ago

DillonJ commented 1 year ago

It seems like the commit history viewer only shows values that have changed, it doesn't show:

Not sure if this was the intended design, but it would be hugely useful if more information could be shown

image

manuelma commented 1 year ago

This is a known weakness of the current DB schema and I don't think we can do anything by 0.7.

The thing is, every time we modify a record we lose all the previous history by design. This is because the record is just updated in the db together with the new commit id. For this reason, the commit history viewer cannot find the records for previous commits - they're just gone.

Similar when we remove a record.

To be able to show a history, we should add new records with new commits instead of updating existing ones. But this means the tables have the potential to grow very large and we'd need to do something about that as well... There are some plans to handle this in the current proposal for DB schema changes.