-- Award reference lists (Parks On The Air, SOTA summits, WWFF, IOTA…).
-- Each row is one valid reference for an award, used to provide award totals,
-- reference names, and (later) per-QSO reference assignment + per-DXCC filtering.
-- Lists are downloaded/updated from each program's published file.
CREATE TABLE IF NOT EXISTS award_references (
    award_code TEXT NOT NULL,
    ref_code   TEXT NOT NULL,
    name       TEXT NOT NULL DEFAULT '',
    dxcc       INTEGER NOT NULL DEFAULT 0,
    grp        TEXT NOT NULL DEFAULT '',
    subgrp     TEXT NOT NULL DEFAULT '',
    PRIMARY KEY (award_code, ref_code)
);

CREATE INDEX IF NOT EXISTS idx_award_ref_dxcc ON award_references(award_code, dxcc);
