summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-21 17:09:24 +0000
committerlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-21 17:09:24 +0000
commitaf108df9ba2f8a7b7ffa9788a7e0f96844133a51 (patch)
tree3685f61912572fb35601e0330521641e9aca53a5
parent344729ef6bc9da615e2dc11ee378e8da03b0319b (diff)
session.token now uses a varchar(32) with length check constraint. session_id now uses a proper serial as we don't support version < 8.x this should be fine
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@255 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xsql/Pg-tables.sql6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/Pg-tables.sql b/sql/Pg-tables.sql
index 59e60248..78b7835f 100755
--- a/sql/Pg-tables.sql
+++ b/sql/Pg-tables.sql
@@ -564,12 +564,10 @@ CREATE TABLE jcitems (
-- Session tracking table
-CREATE SEQUENCE session_session_id_seq;
-
CREATE TABLE session(
-session_id INTEGER PRIMARY KEY DEFAULT nextval('session_session_id_seq'),
+session_id serial PRIMARY KEY,
sl_login VARCHAR(50),
-token CHAR(32),
+token VARCHAR(32) CHECK(length(token) = 32),
last_used TIMESTAMP default now()
);