diff --git a/db/nexrad.sql b/db/nexrad.sql index 81260b0..2f4616a 100644 --- a/db/nexrad.sql +++ b/db/nexrad.sql @@ -44,25 +44,26 @@ select CreateSpatialIndex('nexrad_storm_event', 'coord_end'); create table nexrad_vtec_event ( - id INTEGER PRIMARY KEY NOT NULL, - timestamp_issued TIMESTAMP NOT NULL, - timestamp_expired TIMESTAMP NOT NULL, - timestamp_init_iss TIMESTAMP NOT NULL, - timestamp_init_exp TIMESTAMP NOT NULL, - timestamp_updated TIMESTAMP NOT NULL, - timestamp_poly_start TIMESTAMP NOT NULL, - timestamp_poly_end TIMESTAMP NOT NULL, - event_id INTEGER, - status TEXT NOT NULL, - wfo TEXT NOT NULL, - sig TEXT NOT NULL, - phenom TEXT NOT NULL, - hail_size FLOAT, - wind_speed FLOAT, - tornado_tag TEXT, - damage_tag TEXT + id INTEGER PRIMARY KEY NOT NULL, + timestamp_issued TIMESTAMP NOT NULL, + timestamp_start TIMESTAMP NOT NULL, + timestamp_end TIMESTAMP NOT NULL, + typeof TEXT NOT NULL, + actions TEXT NOT NULL, + wfo TEXT NOT NULL, + phenom TEXT NOT NULL, + sig TEXT NOT NULL, + etn INTEGER NOT NULL, + body TEXT NOT NULL, + azimuth FLOAT NOT NULL, + speed FLOAT NOT NULL, + forecaster TEXT NOT NULL ); +select + AddGeometryColumn('nexrad_vtec_event', 'location', 4326, 'POINT'), + CreateSpatialIndex('nexrad_vtec_event', 'location'); + select AddGeometryColumn('nexrad_vtec_event', 'poly', 4326, 'POLYGON'), CreateSpatialIndex('nexrad_vtec_event', 'poly');