CREATE TABLE asn_prefix_cache (
    asn           INTEGER PRIMARY KEY,
    holder        TEXT NOT NULL DEFAULT '',
    prefixes_json TEXT NOT NULL DEFAULT '[]',
    fetched_at    TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))
);

CREATE INDEX idx_asn_prefix_cache_fetched ON asn_prefix_cache (fetched_at);
