openkfw / Oscar

A digital decision support system for humanitarian operations
https://www.oscarplatform.org/
GNU General Public License v3.0
11 stars 1 forks source link

Initial postgresql database structure #129

Closed bariela closed 2 years ago

bariela commented 2 years ago

When starting postgresql database, create initial tables, too

Tables:

layer_geo_data

reference_id PK format geo_data_url data JSONB metadata JSONB created_at updated_at

map_layers

reference_id PK geo_reference_id (FK from layer_geo_data) layer_type category title attribute_id (FK from attributes) attribute_description JSONB styles JSONB legend JSONB layer_options JSONB created_at updated_at

attributes

attribute_id PK attribute_type attribute_key name geo_data JSONB detail JSONB metadata JSONB created_at updated_at

region_attributes

id UUID PK attribute_id (FK from attributes) feature_id feature_id_lvl value value_type date_ISO date_data created_at updated_at

point_attributes

id UUID PK attribute_id (FK from attributes) geometry GEOMETRY properties JSONB created_at updated_at