Add closed column to session table and use it in session

This commit is contained in:
Jana Cupova 2022-11-21 17:23:36 +01:00 committed by Tomas Kopecek
parent b7bedc17b5
commit 1f0c12930d
3 changed files with 16 additions and 3 deletions

View file

@ -119,6 +119,7 @@ CREATE TABLE sessions (
start_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
update_time TIMESTAMPTZ NOT NULL DEFAULT NOW(),
exclusive BOOLEAN CHECK (exclusive),
closed BOOLEAN NOT NULL DEFAULT FALSE,
CONSTRAINT no_exclusive_subsessions CHECK (
master IS NULL OR "exclusive" IS NULL),
CONSTRAINT exclusive_expired_sane CHECK (