654 updated database documentation#792
Conversation
badnames
left a comment
There was a problem hiding this comment.
Well done!
As usual just a few minor things.
|
@temmey let us get this done, please request review when you are ready and/or set labels accordingly |
|
@temmey let us do this first, it basically only needs that you reread your own text and rebase it. |
chr-schr
left a comment
There was a problem hiding this comment.
Some sections are incomplete / not up to date with the database schema.
| INT price | ||
| INT generation | ||
| TEXT notes | ||
| INT owner_id "NOT NULL" |
There was a problem hiding this comment.
Fix types
| INT price | |
| INT generation | |
| TEXT notes | |
| INT owner_id "NOT NULL" | |
| SMALLINT price | |
| SMALLINT generation | |
| TEXT notes | |
| UUID owner_id "NOT NULL" |
| INT zoom_factor "NOT NULL" | ||
| INT honors "NOT NULL" | ||
| INT visits "NOT NULL" | ||
| INT harvested "NOT NULL" | ||
| PRIVACY_OPTION privacy "NOT NULL" | ||
| TEXT description | ||
| GEOGRAPHY location | ||
| INT owner_id "NOT NULL" |
There was a problem hiding this comment.
Fix types
| INT zoom_factor "NOT NULL" | |
| INT honors "NOT NULL" | |
| INT visits "NOT NULL" | |
| INT harvested "NOT NULL" | |
| PRIVACY_OPTION privacy "NOT NULL" | |
| TEXT description | |
| GEOGRAPHY location | |
| INT owner_id "NOT NULL" | |
| SMALLINT zoom_factor "NOT NULL" | |
| SMALLINT honors "NOT NULL" | |
| SMALLINT visits "NOT NULL" | |
| SMALLINT harvested "NOT NULL" | |
| PRIVACY_OPTION privacy "NOT NULL" | |
| TEXT description | |
| GEOGRAPHY location | |
| UUID owner_id "NOT NULL" |
|
|
||
|
|
||
| plantings { | ||
| INT id PK |
There was a problem hiding this comment.
Fix type
| INT id PK | |
| UUID id PK |
| REAL scale_y "NOT NULL" | ||
| DATE add_date | ||
| DATE remove_date | ||
| } |
There was a problem hiding this comment.
Add missing seed_id
| } | |
| INT seed_id | |
| } |
| blossoms { | ||
| TEXT title PK | ||
| TEXT description | ||
| TRACKS track |
There was a problem hiding this comment.
Fix typo
| TRACKS track | |
| TRACK track |
| } | ||
|
|
||
|
|
||
| blossoms_gained { |
There was a problem hiding this comment.
Table is called gained_blossoms
| blossoms_gained { | |
| gained_blossoms { |
| blossoms ||--o{ blossoms_gained : "" | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Some relationships were missing
| blossoms ||--o{ blossoms_gained : "" | |
| blossoms ||--o{ gained_blossoms : "" | |
| gained_blossoms }o--|| users : "gained by" | |
| users ||--o| guided_tours : "" | |
| base_layer_images }o--|| layers : "belongs to" | |
| users ||--o{ seeds : "" | |
| plantings }o--|| seeds : "" |
| @@ -2,6 +2,8 @@ | |||
|
|
|||
| ## `Plant_detail` | |||
There was a problem hiding this comment.
| ## `Plant_detail` | |
| ## `Plants` |
| | **_Column name_** | **_Example_** | **_Description_** | | ||
| | :---------------- | :------------ | :--------------------------------------------------------------------------------------------- | | ||
| | **id** | 1 | | ||
| | **owner_id** | 1 | | ||
| | **name** | My Map | only alphanumerical values | | ||
| | **is_inactive** | false | | ||
| | **last_visit** | 2023-04-04 | | ||
| | **honors** | 0 | 0 to infinity | | ||
| | **visits** | 0 | 0 to infinity | | ||
| | **harvested** | 0 | 0 to infinity, amount of plants harvested on this map | | ||
| | **privacy** | protected | privacy_option enum type | | ||
| | **description** | Our first map | | | ||
| | **creation_date** | 2023-04-04 | | ||
| | **deletion_date** | 2023-04-04 | | ||
| | **zoom_factor** | 100 | value used in formula "X by X cm", e.g. 100 would mean "100 x 100 cm", range from 10 to 100000 | | ||
| | **location** | NULL | PostGis Geodata, location of the map | | ||
| | **geometry** | FILLME | Layout of the map. | |
There was a problem hiding this comment.
Not up to date with the database schema
There was a problem hiding this comment.
I think we shouldn't fully replicate everything in docu but rather only have the essence. Maybe we simply remove/reduce this?
markus2330
left a comment
There was a problem hiding this comment.
Great job! Maybe a bit reduction and when @chr-schr approves, we can merge.
| | **_Column name_** | **_Example_** | **_Description_** | | ||
| | :---------------- | :------------ | :--------------------------------------------------------------------------------------------- | | ||
| | **id** | 1 | | ||
| | **owner_id** | 1 | | ||
| | **name** | My Map | only alphanumerical values | | ||
| | **is_inactive** | false | | ||
| | **last_visit** | 2023-04-04 | | ||
| | **honors** | 0 | 0 to infinity | | ||
| | **visits** | 0 | 0 to infinity | | ||
| | **harvested** | 0 | 0 to infinity, amount of plants harvested on this map | | ||
| | **privacy** | protected | privacy_option enum type | | ||
| | **description** | Our first map | | | ||
| | **creation_date** | 2023-04-04 | | ||
| | **deletion_date** | 2023-04-04 | | ||
| | **zoom_factor** | 100 | value used in formula "X by X cm", e.g. 100 would mean "100 x 100 cm", range from 10 to 100000 | | ||
| | **location** | NULL | PostGis Geodata, location of the map | | ||
| | **geometry** | FILLME | Layout of the map. | |
There was a problem hiding this comment.
I think we shouldn't fully replicate everything in docu but rather only have the essence. Maybe we simply remove/reduce this?
|
I would argue to remove the table descriptions. Ideally they would be somehow automatically generated from the rust table definitions such that we only have a single source of truth, but as it stands I anticipate them to always be out of sync. |
|
If we don't find some minimal descriptions that are still useful to get an overview, we can also get rid of this documentation completely. What speaks to maybe keep it: It was mostly used to design the relations and might be useful when we do non-trivial extensions. We can today also speak a bit about how to document GIS systems. |
Basics
close #X, are in the commit messages.Checklist
(not in the PR description)
(exceptions are documented)
Review