Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gde-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dynamic ExposureDynamic Exposure
  • Global Dynamic ExposureGlobal Dynamic Exposure
  • gde-core
  • Merge requests
  • !24

Made DatabaseStorage.store_OBM_building_classes() erase first existing database entries

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Cecilia Nievas requested to merge fix/erase_old_gde_buildings into master Jun 16, 2022
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 3

DatabaseStorage.store_OBM_building_classes() was already checking whether a particular combination of osm_id and ggregated_source_id existed in the gde_buildings database table so as to either update that entry or create a new one. However, it may happen that OBM buildings that used to exist for a particular combination of 'data_unit_id' and 'occupancy_case' and 'aggregated_source_id' no longer exist when the code is re-run. This MR addresses this issue by making DatabaseStorage.store_OBM_building_classes() first erase all entries in the gde_buildings database table associated with the input combination of 'data_unit_id' and 'occupancy_case' and 'aggregated_source_id'.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/erase_old_gde_buildings