-- Shared reverse index schema

CREATE TABLE IF NOT EXISTS zone_index (
    zone            TEXT NOT NULL,
    did             TEXT NOT NULL,
    verified        INTEGER NOT NULL DEFAULT 0,
    first_seen      INTEGER NOT NULL,
    last_verified   INTEGER,
    PRIMARY KEY (zone, did)
);

CREATE INDEX IF NOT EXISTS idx_zone_index_did
    ON zone_index(did);
