wip: currently rewriting the project as a full stack application tangled.org/kacaii.dev/sigo
gleam
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:card_file_box: store occurrence location in a `point` attribute

Kacaii 3f5031bd ba66d80c

+19 -19
+18 -15
README.md
··· 21 21 22 22 user_role { 23 23 UUID id PK 24 - VARCHAR(255) name 24 + TEXT name 25 25 TEXT description 26 26 } 27 27 ··· 29 29 user_account { 30 30 UUID id PK 31 31 INTEGER role_id FK 32 - VARCHAR(255) email UK 33 - VARCHAR(255) full_name 32 + TEXT full_name 34 33 TEXT password_hash 35 - VARCHAR(255) registration 36 - VARCHAR(255) phone 34 + TEXT registration 35 + TEXT phone 36 + TEXT email UK 37 37 BOOLEAN is_active 38 + TIMESTAMP created_at 39 + TIMESTAMP updated_at 38 40 } 39 41 40 - brigade { 42 + brigade { 41 43 UUID id PK 42 - varchar(255) name 44 + TEXT name 43 45 TEXT description 44 46 BOOLEAN is_active 45 47 } ··· 52 54 UUID group_id FK 53 55 } 54 56 55 - ocurrence_type |o--o{ ocurrence_type : has_parent 56 - ocurrence_type { 57 + occurrence_type |o--o{ occurrence_type : subtype_of 58 + occurrence_type { 57 59 UUID id PK 58 60 UUID parent_type FK 59 - VARCHAR(255) name UK 61 + TEXT name UK 60 62 TEXT description 61 63 TIMESTAMP created_at 64 + TIMESTAMP updated_at 62 65 } 63 66 64 - ocurrence }|--|| user_account : submit 65 - ocurrence }|--|| ocurrence_type : is 66 - ocurrence { 67 + occurrence }|--|| user_account : submit 68 + occurrence }|--|| occurrence_type : is 69 + occurrence { 67 70 UUID id PK 68 71 UUID applicant_id FK 69 72 UUID type_id FK 70 73 TEXT description 71 - VARCHAR(255) address 72 - VARCHAR(255) reference_point 74 + POINT location 75 + TEXT reference_point 73 76 NUMERIC(2) loss_percentage 74 77 TIMESTAMP created_at 75 78 TIMESTAMP updated_at
+1 -4
priv/sql/rebuild_database.sql
··· 82 82 subtype_id UUID REFERENCES occurrence_type (id) 83 83 ON UPDATE CASCADE ON DELETE SET NULL DEFAULT NULL, 84 84 description TEXT, 85 - 86 - -- HACK:  There might be a better way to store this 87 - address TEXT NOT NULL, 88 - 85 + location POINT NOT NULL, 89 86 reference_point TEXT NOT NULL, 90 87 loss_percentage NUMERIC(2), 91 88 created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,