Skip to content

Commit

Permalink
add watch probability storage
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Apr 30, 2022
1 parent 1a350e2 commit 07353bb
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
20 changes: 18 additions & 2 deletions init/postgis.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CREATE EXTENSION postgis;
CREATE TABLE iem_schema_manager_version(
version int,
updated timestamptz);
INSERT into iem_schema_manager_version values (59, now());
INSERT into iem_schema_manager_version values (60, now());

---
--- TABLES THAT ARE LOADED VIA shp2pgsql
Expand Down Expand Up @@ -1073,7 +1073,23 @@ CREATE TABLE watches (
type character(3),
report text,
num smallint,
geom geometry(MultiPolygon, 4326)
geom geometry(MultiPolygon, 4326),
tornadoes_2m smallint,
tornadoes_1m_strong smallint,
wind_10m smallint,
wind_1m_65kt smallint,
hail_10m smallint,
hail_1m_2inch smallint,
hail_wind_6m smallint,
max_hail_size float,
max_wind_gust_knots float,
max_tops_feet int,
storm_motion_drct int,
storm_motion_sknt int,
is_pds bool,
product_id_wwp varchar(36),
product_id_saw varchar(36),
product_id_wou varchar(36)
);
ALTER TABLE watches OWNER to mesonet;
GRANT ALL on watches to ldm;
Expand Down
17 changes: 17 additions & 0 deletions upgrade/postgis/60.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Storage of Watch Probabilites
ALTER TABLE watches add tornadoes_2m smallint;
ALTER TABLE watches add tornadoes_1m_strong smallint;
ALTER TABLE watches add wind_10m smallint;
ALTER TABLE watches add wind_1m_65kt smallint;
ALTER TABLE watches add hail_10m smallint;
ALTER TABLE watches add hail_1m_2inch smallint;
ALTER TABLE watches add hail_wind_6m smallint;
ALTER TABLE watches add max_hail_size float;
ALTER TABLE watches add max_wind_gust_knots float;
ALTER TABLE watches add max_tops_feet int;
ALTER TABLE watches add storm_motion_drct int;
ALTER TABLE watches add storm_motion_sknt int;
ALTER TABLE watches add is_pds bool;
ALTER TABLE watches add product_id_wwp varchar(36);
ALTER TABLE watches add product_id_saw varchar(36);
ALTER TABLE watches add product_id_wou varchar(36);

0 comments on commit 07353bb

Please sign in to comment.