summaryrefslogtreecommitdiff
path: root/util/updates
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-07-31 12:50:31 +0200
committerYorhel <git@yorhel.nl>2009-07-31 12:50:31 +0200
commitaf5293b8d33f4948ee5c9bcc2c4df38e611c88c6 (patch)
tree7f530f9df07bbfb893c74e406f127237b89b316b /util/updates
parent5e9e6a78d3b7ffd177d91dba6602946dbd9a4c09 (diff)
Use bytea data type to store session tokens
To be consistent with users.passwd - hashes are stored in binary. All conversion from/to hex is done in the DB layer.
Diffstat (limited to 'util/updates')
-rw-r--r--util/updates/update_2.6.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/updates/update_2.6.sql b/util/updates/update_2.6.sql
index 79fefd69..f0ddff65 100644
--- a/util/updates/update_2.6.sql
+++ b/util/updates/update_2.6.sql
@@ -3,7 +3,7 @@
-- Create table for session data storage
CREATE TABLE sessions (
uid integer NOT NULL REFERENCES users(id),
- token character(40) NOT NULL,
+ token bytea NOT NULL,
expiration timestamp NOT NULL DEFAULT (NOW() + '1 year'::interval),
PRIMARY KEY (uid, token)
);