Closed redekok closed 1 year ago
As just discussed with @redekok I think creating a separate migration for the renaming of the keys is indeed a bit neater.
Before implementing a method to rename the keys I've searched to see whether this was done previously and this seemed to be the case numerous times, most recently here. For my eyes this seems to be a rather database-expensive manner of renaming however, looking up DatasetEdits
through Commits
and Datasets
. I've therefore changed this to be a bit more efficient and just directly search for DatasetEdits
containing the keys to change here.
This issue was resolved through this migration.
Due to the heat improvements modelling project a lot of dataset keys (or interface elements) have been renamed. For instance,
energy_heat_burner_coal
has been renamed toenergy_heat_burner_ht_coal
. Also, new keys have been added (e.g.energy_heat_burner_mt_coal
) but those are out of scope of this issue.On the
heat-2023
branch these interface elements have been renamed yet, e.g. see here.For all new keys (so not the ones that should be renamed but the entirely new ones, such as
energy_heat_burner_mt_coal
in the example above) I have created a migration. Thedata.csv
file in the corresponding folder contains all new interface elements and their values, not the ones that are to be renamed. I did create an overview in the migration script of the keys that have to be renamed.At first, I wanted to include the rename operation in the existing migration. But on second thought it might seem like a better (and neater?) idea to create a separate migration for this. What do you think @thomas-qah?
As for your question on Slack about the
DatasetEdits
I'm not sure whether this is the case. Perhaps @noracato can help you out here?