Bring database schema in line with vtec.py

This commit is contained in:
XANTRONIX Industrial 2025-02-19 20:24:45 -05:00
parent 5528b43a57
commit 90e98e0e1b

View file

@ -44,25 +44,26 @@ select
CreateSpatialIndex('nexrad_storm_event', 'coord_end'); CreateSpatialIndex('nexrad_storm_event', 'coord_end');
create table nexrad_vtec_event ( create table nexrad_vtec_event (
id INTEGER PRIMARY KEY NOT NULL, id INTEGER PRIMARY KEY NOT NULL,
timestamp_issued TIMESTAMP NOT NULL, timestamp_issued TIMESTAMP NOT NULL,
timestamp_expired TIMESTAMP NOT NULL, timestamp_start TIMESTAMP NOT NULL,
timestamp_init_iss TIMESTAMP NOT NULL, timestamp_end TIMESTAMP NOT NULL,
timestamp_init_exp TIMESTAMP NOT NULL, typeof TEXT NOT NULL,
timestamp_updated TIMESTAMP NOT NULL, actions TEXT NOT NULL,
timestamp_poly_start TIMESTAMP NOT NULL, wfo TEXT NOT NULL,
timestamp_poly_end TIMESTAMP NOT NULL, phenom TEXT NOT NULL,
event_id INTEGER, sig TEXT NOT NULL,
status TEXT NOT NULL, etn INTEGER NOT NULL,
wfo TEXT NOT NULL, body TEXT NOT NULL,
sig TEXT NOT NULL, azimuth FLOAT NOT NULL,
phenom TEXT NOT NULL, speed FLOAT NOT NULL,
hail_size FLOAT, forecaster TEXT NOT NULL
wind_speed FLOAT,
tornado_tag TEXT,
damage_tag TEXT
); );
select
AddGeometryColumn('nexrad_vtec_event', 'location', 4326, 'POINT'),
CreateSpatialIndex('nexrad_vtec_event', 'location');
select select
AddGeometryColumn('nexrad_vtec_event', 'poly', 4326, 'POLYGON'), AddGeometryColumn('nexrad_vtec_event', 'poly', 4326, 'POLYGON'),
CreateSpatialIndex('nexrad_vtec_event', 'poly'); CreateSpatialIndex('nexrad_vtec_event', 'poly');