Query
CREATE TABLE access_codes (
code TEXT PRIMARY KEY,
user_id TEXT NOT NULL REFERENCES users(id),
expires_at INTEGER NOT NULL,
used_at INTEGER,
created_at INTEGER NOT NULL DEFAULT (unixepoch())
)
CREATE TABLE access_codes (
code TEXT PRIMARY KEY,
user_id TEXT NOT NULL REFERENCES users(id),
expires_at INTEGER NOT NULL,
used_at INTEGER,
created_at INTEGER NOT NULL DEFAULT (unixepoch())
)