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/mssql.upgrade.sql | 27 +++++++++++---------------- 1 files changed, 11 insertions(+), 16 deletions(-) diff --git a/SQL/mssql.upgrade.sql b/SQL/mssql.upgrade.sql index 29440f9..b479b16 100644 --- a/SQL/mssql.upgrade.sql +++ b/SQL/mssql.upgrade.sql @@ -111,7 +111,7 @@ DELETE FROM [dbo].[cache] GO --- Updates from version 0.6-stable +-- Updates from version 0.6 CREATE TABLE [dbo].[dictionary] ( [user_id] [int] , @@ -157,6 +157,7 @@ [user_id] [int] NOT NULL , [mailbox] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL , [changed] [datetime] NOT NULL , + [valid] [char] (1) COLLATE Latin1_General_CI_AI NOT NULL , [data] [text] COLLATE Latin1_General_CI_AI NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO @@ -175,12 +176,7 @@ [uid] [int] NOT NULL , [changed] [datetime] NOT NULL , [data] [text] COLLATE Latin1_General_CI_AI NOT NULL - [seen] [char](1) NOT NULL , - [deleted] [char](1) NOT NULL , - [answered] [char](1) NOT NULL , - [forwarded] [char](1) NOT NULL , - [flagged] [char](1) NOT NULL , - [mdnsent] [char](1) NOT NULL , + [flags] [int] NOT NULL , ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO @@ -206,7 +202,8 @@ GO ALTER TABLE [dbo].[cache_index] ADD - CONSTRAINT [DF_cache_index_changed] DEFAULT (getdate()) FOR [changed] + CONSTRAINT [DF_cache_index_changed] DEFAULT (getdate()) FOR [changed], + CONSTRAINT [DF_cache_index_valid] DEFAULT ('0') FOR [valid] GO CREATE INDEX [IX_cache_index_user_id] ON [dbo].[cache_index]([user_id]) ON [PRIMARY] @@ -220,13 +217,8 @@ GO ALTER TABLE [dbo].[cache_messages] ADD - CONSTRAINT [DF_cache_messages_changed] DEFAULT (getdate()) FOR [changed] - CONSTRAINT [DF_cache_messages_seen] DEFAULT (0) FOR [seen], - CONSTRAINT [DF_cache_messages_deleted] DEFAULT (0) FOR [deleted], - CONSTRAINT [DF_cache_messages_answered] DEFAULT (0) FOR [answered], - CONSTRAINT [DF_cache_messages_forwarded] DEFAULT (0) FOR [forwarded], - CONSTRAINT [DF_cache_messages_flagged] DEFAULT (0) FOR [flagged], - CONSTRAINT [DF_cache_messages_mdnsent] DEFAULT (0) FOR [mdnsent], + CONSTRAINT [DF_cache_messages_changed] DEFAULT (getdate()) FOR [changed], + CONSTRAINT [DF_cache_messages_flags] DEFAULT (0) FOR [flags] GO CREATE INDEX [IX_cache_messages_user_id] ON [dbo].[cache_messages]([user_id]) ON [PRIMARY] @@ -246,4 +238,7 @@ FOREIGN KEY ([user_id]) REFERENCES [dbo].[users] ([user_id]) ON DELETE CASCADE ON UPDATE CASCADE GO - \ No newline at end of file + +ALTER TABLE [dbo].[session] ALTER COLUMN [sess_id] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL +GO + -- Gitblit v1.9.1