From b8ae0ecb22264b6a4dc8785c431a8d0556fa83bf Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Tue, 22 Nov 2011 03:36:29 -0500 Subject: [PATCH] - Fixed bug where session ID's length was limited to 40 characters. Since PHP5.3 it's possible to set session.hash_function to any hash algorithm that would produce strings up to 128 characters long (#1488196) --- SQL/postgres.update.sql | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 42 insertions(+), 1 deletions(-) diff --git a/SQL/postgres.update.sql b/SQL/postgres.update.sql index e316ff5..d06ee84 100644 --- a/SQL/postgres.update.sql +++ b/SQL/postgres.update.sql @@ -101,7 +101,7 @@ TRUNCATE messages; TRUNCATE cache; --- Updates from version 0.6-stable +-- Updates from version 0.6 CREATE TABLE dictionary ( user_id integer DEFAULT NULL @@ -126,3 +126,44 @@ data text NOT NULL, CONSTRAINT searches_user_id_key UNIQUE (user_id, "type", name) ); + +DROP SEQUENCE messages_ids; +DROP TABLE messages; + +CREATE TABLE cache_index ( + user_id integer NOT NULL + REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE, + mailbox varchar(255) NOT NULL, + changed timestamp with time zone DEFAULT now() NOT NULL, + valid smallint NOT NULL DEFAULT 0, + data text NOT NULL, + PRIMARY KEY (user_id, mailbox) +); + +CREATE INDEX cache_index_changed_idx ON cache_index (changed); + +CREATE TABLE cache_thread ( + user_id integer NOT NULL + REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE, + mailbox varchar(255) NOT NULL, + changed timestamp with time zone DEFAULT now() NOT NULL, + data text NOT NULL, + PRIMARY KEY (user_id, mailbox) +); + +CREATE INDEX cache_thread_changed_idx ON cache_thread (changed); + +CREATE TABLE cache_messages ( + user_id integer NOT NULL + REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE, + mailbox varchar(255) NOT NULL, + uid integer NOT NULL, + changed timestamp with time zone DEFAULT now() NOT NULL, + data text NOT NULL, + flags integer NOT NULL DEFAULT 0, + PRIMARY KEY (user_id, mailbox, uid) +); + +CREATE INDEX cache_messages_changed_idx ON cache_messages (changed); + +ALTER TABLE "session" ALTER sess_id TYPE varchar(128); -- Gitblit v1.9.1