diff options
author | Yorhel <git@yorhel.nl> | 2010-01-26 19:46:32 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-01-26 19:46:32 +0100 |
commit | 38174567d7f68a2751426c0fadcda5eca1bd6861 (patch) | |
tree | 1d6832acd003ae2e0018ea47408319957dc5ef4c /util/sql | |
parent | 4dfb556ecc621b1983d7ad4154db202ec7530e44 (diff) |
Keep track of when a session has last been used
If we're going to automatically remove older sessions, it would make
more sense to remove unused sessions, rather than old sessions that are
still in use. But we first need to keep track of when a session has last
been used to do so...
Diffstat (limited to 'util/sql')
-rw-r--r-- | util/sql/schema.sql | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql index f345cffd..f0091929 100644 --- a/util/sql/schema.sql +++ b/util/sql/schema.sql @@ -173,6 +173,7 @@ CREATE TABLE sessions ( uid integer NOT NULL, token bytea NOT NULL, expiration timestamptz NOT NULL DEFAULT (now() + '1 year'::interval), + lastused timestamptz NOT NULL DEFAULT NOW(), PRIMARY KEY (uid, token) ); |