diff --git a/internal/db/migrations/postgres.gen.go b/internal/db/migrations/postgres.gen.go index 147ccc4e42..9552935ad9 100644 --- a/internal/db/migrations/postgres.gen.go +++ b/internal/db/migrations/postgres.gen.go @@ -3405,7 +3405,7 @@ begin; expiration_time wt_timestamp, -- maybe null -- limit on number of session connections allowed. default of 0 equals no limit connection_limit int not null default 1 - check(connection_limit >= 0), + check(connection_limit > 0 or connection_limit = -1), -- trust of first use token tofu_token bytea, -- will be null when session is first created -- the reason this session ended (null until terminated) diff --git a/internal/db/migrations/postgres/50_session.up.sql b/internal/db/migrations/postgres/50_session.up.sql index 94c3536a96..2845f2be07 100644 --- a/internal/db/migrations/postgres/50_session.up.sql +++ b/internal/db/migrations/postgres/50_session.up.sql @@ -133,7 +133,7 @@ begin; expiration_time wt_timestamp, -- maybe null -- limit on number of session connections allowed. default of 0 equals no limit connection_limit int not null default 1 - check(connection_limit >= 0), + check(connection_limit > 0 or connection_limit = -1), -- trust of first use token tofu_token bytea, -- will be null when session is first created -- the reason this session ended (null until terminated)