This repository was archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Add type_id to the Alerts table #40
Copy link
Copy link
Open
Labels
Help WantedGood items to start with if you are looking to help with the projectGood items to start with if you are looking to help with the projectIn ProgressCurrently being worked onCurrently being worked onPhase 1 RDSEnd to end data processor with hooks and alarmsEnd to end data processor with hooks and alarmsv3.0
Description
I'd like to add a type_id that references the alert_types table. Currently this table is unused. I also think the type and subtype columns should be removed from the alerts table.
-- modify database
ALTER TABLE waze.alerts ADD COLUMN IF NOT EXISTS type_id INTEGER;
CREATE INDEX CONCURRENTLY alerts_type_id_idx ON waze.alerts (type_id);
-- add data to new type_id field in alerts
UPDATE waze.alerts AS a
SET type_id = t.id
FROM waze.alert_types AS t
WHERE a.type = t.type
and a.subtype = t.subtype
and a.type_id is null;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Help WantedGood items to start with if you are looking to help with the projectGood items to start with if you are looking to help with the projectIn ProgressCurrently being worked onCurrently being worked onPhase 1 RDSEnd to end data processor with hooks and alarmsEnd to end data processor with hooks and alarmsv3.0