diff options
author | 3dB <3db@3decibels.net> | 2009-07-24 03:40:23 -0400 |
---|---|---|
committer | 3dB <3db@3decibels.net> | 2009-07-24 03:40:23 -0400 |
commit | a1fc2a9a103e0f426ac4e496200408a2deccaaf0 (patch) | |
tree | d19e8f0e867341cfe53dd1f6891689a66ad6c8a2 /util | |
parent | 54e93c0f6b1ef23516d7c7ba88efaa601e7318cc (diff) |
Checkin of auth rewrite progress.
Added a new DB library for handling sessions.
New update SQL file for database changes.
Added a line to the global config file to set a global salt. It is separate
from the cookie_key because it is much more important that it not be changed.
Diffstat (limited to 'util')
-rw-r--r-- | util/updates/update_2.6.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/util/updates/update_2.6.sql b/util/updates/update_2.6.sql new file mode 100644 index 00000000..6d38c8b8 --- /dev/null +++ b/util/updates/update_2.6.sql @@ -0,0 +1,14 @@ + +-- Create table for session data storage + +CREATE TABLE sessions ( + uid integer NOT NULL REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE, + token character(40) NOT NULL, + expiration bigint DEFAULT 0 NOT NULL, + PRIMARY KEY (uid, token) +); + +-- Add column to users for salt storage + +ALTER TABLE users ADD COLUMN salt character(9) NOT NULL DEFAULT 0; + |