-- Tabla de aerolineas (datos de Wikidata)

CREATE TABLE IF NOT EXISTS airlines (
  iata TEXT PRIMARY KEY,
  icao TEXT,
  name TEXT NOT NULL,
  logo_url TEXT,
  website TEXT,
  updated_at TIMESTAMPTZ DEFAULT now()
);

CREATE INDEX IF NOT EXISTS idx_airlines_icao ON airlines(icao);

GRANT SELECT ON airlines TO anon, authenticated;
