spine-tools / Spine-Database-API

Database interface to Spine generic data model
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Fix database migration when database has no multidimensional entity classes #339

Closed soininen closed 5 months ago

soininen commented 5 months ago

This PR fixes the migration script that add active_by_default column to entity_class tables. The script resulted in a Traceback when the upgradeable database did not have multidimensional entity classes.

Fixes spine-tools/Spine-Toolbox#2512

Checklist before merging

codecov-commenter commented 5 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (782b041) 77.14% compared to head (74d39ad) 77.04%.

Files Patch % Lines
...eff478bcb_add_active_by_default_to_entity_class.py 0.00% 1 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 0.8-dev #339 +/- ## =========================================== - Coverage 77.14% 77.04% -0.10% =========================================== Files 75 75 Lines 9239 9241 +2 Branches 1949 1950 +1 =========================================== - Hits 7127 7120 -7 - Misses 1780 1786 +6 - Partials 332 335 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.