CREATE TABLE IF NOT EXISTS metars (
    id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
    raw_text TEXT NOT NULL,
    station_id TEXT NOT NULL,
    observation_time TEXT NOT NULL,
    latitude DOUBLE PRECISION NOT NULL,
    longitude DOUBLE PRECISION NOT NULL,
    temp_c DOUBLE PRECISION,
    dewpoint_c DOUBLE PRECISION,
    wind_dir_degrees TEXT,
    wind_speed_kt INTEGER,
    visibility_statute_mi TEXT,
    altim_in_hg DOUBLE PRECISION,
    sea_level_pressure_mb DOUBLE PRECISION,
    wx_string TEXT,
    flight_category TEXT,
    three_hr_pressure_tendency_mb DOUBLE PRECISION,
    metar_type TEXT NOT NULL,
    max_t_c DOUBLE PRECISION,
    min_t_c DOUBLE PRECISION,
    precip_in DOUBLE PRECISION,
    elevation_m INTEGER NOT NULL
);