add session handling

This commit is contained in:
Philipp 2021-08-29 17:09:48 +02:00
parent 5c7d92f4f3
commit a80dac4985
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 276B613AF9DBE9C3
10 changed files with 64 additions and 12 deletions

View file

@ -0,0 +1 @@
DROP TABLE sessions;

View file

@ -0,0 +1,7 @@
CREATE TABLE sessions (
token TEXT PRIMARY KEY,
data BYTEA NOT NULL,
expiry TIMESTAMPTZ NOT NULL
);
CREATE INDEX sessions_expiry_idx ON sessions (expiry);