Resolve "Simplification of the database structure"
Implements the necessary changes to simplify the exposure database in exposure-lib:
-
Move the geom
field fromTile
andBuilding
toEntity
-
Replace the building_rowid
with theosm_id
(nullable) inEntity
. Now a tile is represented as an entity withosm_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