create table if not exists refresh_tokens
(
    -- info
    token      TEXT not null primary key,
    ip_address TEXT not null,
    user       TEXT not null references users (id),

    -- timings
    created_at TEXT not null default CURRENT_TIMESTAMP,
    expires_at TEXT not null,
    used_at    TEXT,
    revoked_at TEXT
);
