minor fixes

This commit is contained in:
Tomas Kopecek 2022-12-01 13:49:50 +01:00
parent 906958c814
commit 35070f6ba2
3 changed files with 7 additions and 8 deletions

View file

@ -124,6 +124,8 @@ CREATE TABLE sessions (
master IS NULL OR "exclusive" IS NULL),
CONSTRAINT exclusive_expired_sane CHECK (
expired IS FALSE OR "exclusive" IS NULL),
CONSTRAINT no_closed_exclusive CHECK (
closed IS FALSE OR "exclusive" IS NULL),
UNIQUE (user_id,exclusive)
) WITHOUT OIDS;
CREATE INDEX sessions_master ON sessions(master);