Files
foundry-core/db/004-session-lifetime.sql
T
codex-bot 34c461a61c
Foundry Go checks / check (push) Successful in 2m53s
Foundry Go checks / check (pull_request) Successful in 3m9s
feat(auth): renew sessions with 30-day idle and 90-day absolute limits
2026-11-06 12:32:04 +08:00

10 lines
375 B
PL/PgSQL

BEGIN;
-- Existing sessions keep their current idle deadline: expired sessions stay expired.
-- Their original issuance time was not recorded, so the new absolute cap starts here.
ALTER TABLE project_sessions
ADD COLUMN created_at timestamptz NOT NULL DEFAULT now(),
ADD COLUMN absolute_expires_at timestamptz NOT NULL DEFAULT (now() + interval '90 days');
COMMIT;