Resolve "Simplification of the database structure"

Implements the necessary changes to simplify the exposure database in exposure-lib:

  • Move the geom field from Tile and Building to Entity
  • Replace the building_rowid with the osm_id (nullable) in Entity. Now a tile is represented as an entity with osm_id = NULL.
  • Implement the checks to not add the same entity twice. I left the unique constraint in but, because all NULL values are distinct, a trigger must check if two times the same tile is being inserted.
  • Implemented the triggers for inserting and updating.

Closes #17 (closed)

\approve @tara @LaurensJN @shinde

Edited by Danijel Schorlemmer

Merge request reports