internal/store/migrations/0062_web_session_idle.up.sql

6521399c1c78577eb00f1bcf8947c0900b9cb62e
gitbay/internal/store/migrations/0062_web_session_idle.up.sql

8 lines · 463 bytes

1-- expires_at slides forward on use, never past absolute_expires_at.
2-- Sessions open now keep their cap and get a full idle window from here.
3ALTER TABLE web_sessions ADD COLUMN absolute_expires_at TEXT;
4ALTER TABLE web_sessions ADD COLUMN last_used_at TEXT;
5UPDATE web_sessions SET
6    absolute_expires_at = expires_at,
7    last_used_at = strftime('%Y-%m-%dT%H:%M:%fZ','now'),
8    expires_at = min(expires_at, strftime('%Y-%m-%dT%H:%M:%fZ','now','+12 hours'));
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form