-- SPDX-FileCopyrightText: Heiko Schaefer <heiko@schaefer.name>
-- SPDX-License-Identifier: CC0-1.0

--
CREATE TABLE `lookups`
(
    `id`        INTEGER   NOT NULL PRIMARY KEY,
    `source`    INTEGER   NOT NULL,
    `identity`  TEXT      NOT NULL, -- the lookup key that we asked the source for
    `last_poll` TIMESTAMP NOT NULL,

    CONSTRAINT lookups_unique UNIQUE (source, identity)
);
