kabano/_ressources/database_drawing

65 lines
1.8 KiB
Plaintext
Raw Normal View History

2018-03-26 20:21:41 +00:00
# Database structure for kabano.org open-source project
# This file is designed to be imported in quickdatabasediagrams.com
2018-05-08 10:58:57 +00:00
locales
2018-03-26 21:07:31 +00:00
-
2018-05-08 10:58:57 +00:00
name PK varchar(32)
display_name UNIQUE varchar(255)
flag_name UNIQUE varchar(32)
2018-03-26 21:07:31 +00:00
2018-05-08 10:58:57 +00:00
users
2018-03-26 20:21:41 +00:00
-
2018-05-08 10:58:57 +00:00
id PK int4
name UNIQUE varchar(255) # The unique constraint is done with version
version UNIQUE int4 # The unique constraint is done with name
email UNIQUE varchar(255)
password varchar(255)
rank rank_enum # blocked; registered; premium; moderator; admin
website NULL varchar(255)
2018-03-26 20:21:41 +00:00
is_avatar_present boolean
2018-05-08 10:58:57 +00:00
is_archive INDEX boolean
locale varchar(32) FK >- locales.name
timezone varchar(8)
visit_date timestamp
register_date INDEX timestamp
2018-03-26 21:07:31 +00:00
2018-05-08 10:58:57 +00:00
pois
2018-03-26 21:07:31 +00:00
-
2018-05-08 10:58:57 +00:00
id PK int4
permalink UNIQUE varchar(255) # The unique constraint is done with version
version UNIQUE int4 # The unique constraint is done with permalink
creation_date timestamp
update_date timestamp
author int4 FK >- users.id
is_public INDEX boolean
is_archive INDEX boolean
type INDEX poi_type_enum # basic_hut; wilderness_hut; alpine_hut; hostel; bivouac; campsite
is_destroyed INDEX boolean
name varchar(255)
alt_names NULL varchar(255)
source NULL varchar(3) FK >- poi_sources.id
position geometry # Contains elevation data
parameters jsonb
2018-03-26 21:07:31 +00:00
2018-05-08 10:58:57 +00:00
poi_localised
2018-03-26 21:07:31 +00:00
-
2018-05-08 10:58:57 +00:00
id PK int4
poi UNIQUE int4 FK >- pois.id # The unique constraint is done with locale
locale UNIQUE varchar(32) FK >- locales.name # The unique constraint is done with poi
key INDEX poi_key_enum # description; access
value text
2018-03-26 21:07:31 +00:00
2018-05-08 10:58:57 +00:00
poi_sources
2018-03-26 21:07:31 +00:00
-
2018-05-08 10:58:57 +00:00
id PK varchar(3)
display_name UNIQUE varchar(255)
icon_name NULL varchar(255)
website NULL varchar(255)
license_name NULL varchar(255)
license_url NULL varchar(255)
2018-03-26 21:07:31 +00:00
2018-05-08 10:58:57 +00:00
poi_contributors
2018-03-26 21:07:31 +00:00
-
2018-05-08 10:58:57 +00:00
id PK int4
poi UNIQUE int4 FK >- pois.id # The unique constraint is done with contributor
contributor UNIQUE int4 FK >- users.id # The unique constraint is done with poi