diff options
author | Santo Cariotti <santo@dcariotti.me> | 2024-09-12 11:46:27 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2024-09-12 11:46:27 +0200 |
commit | 105f6831d13ebb473b6ce9b63c5c159b5a6c964d (patch) | |
tree | 0e408145276bf8be723710e0a57d872afa9fd49c /schema | |
parent | 48a0c0f007bff5df95c69b727e3ee0e6c3b9bfeb (diff) |
Each alert has text{1,2,3} for the three possible area
Alert level is moved to the notification struct
Diffstat (limited to 'schema')
-rw-r--r-- | schema/init.sql | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/schema/init.sql b/schema/init.sql index 7397619..df76581 100644 --- a/schema/init.sql +++ b/schema/init.sql @@ -29,7 +29,9 @@ CREATE TABLE alerts( user_id INTEGER NOT NULL, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), area GEOMETRY(Polygon, 4326), - level level_alert NOT NULL, + text1 text NOT NULL, + text2 text NOT NULL, + text3 text NOT NULL, reached_users INTEGER DEFAULT 0 NOT NULL, PRIMARY KEY(id), CONSTRAINT fk_users_id @@ -41,6 +43,7 @@ CREATE TABLE notifications( alert_id INTEGER NOT NULL, position_id INTEGER NOT NULL, seen BOOLEAN DEFAULT false, + level level_alert NOT NULL, created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), PRIMARY KEY(id), CONSTRAINT fk_alerts_id |