Working on queries to get latest metar airports first

This commit is contained in:
2025-04-15 22:48:05 -04:00
parent d81f7bcedb
commit f5446ac0eb
8 changed files with 209 additions and 86 deletions

View File

@@ -14,7 +14,8 @@ CREATE TABLE IF NOT EXISTS airports (
latitude REAL NOT NULL,
has_tower BOOLEAN DEFAULT false,
has_beacon BOOLEAN DEFAULT false,
public BOOLEAN DEFAULT false
public BOOLEAN DEFAULT false,
metar_observation_time TIMESTAMPTZ
);
CREATE INDEX ON airports (iata);
@@ -25,6 +26,7 @@ CREATE INDEX ON airports (iso_country);
CREATE INDEX ON airports (iso_region);
CREATE INDEX ON airports (municipality);
CREATE INDEX ON airports (longitude, latitude);
CREATE INDEX ON airports (metar_observation_time);
CREATE TABLE IF NOT EXISTS runways (
id UUID PRIMARY KEY NOT NULL,