diff --git a/lib/database/schema.inc.php b/lib/database/schema.inc.php index 67e6363..dcca76a 100644 --- a/lib/database/schema.inc.php +++ b/lib/database/schema.inc.php @@ -9,31 +9,31 @@ * Document Management Made Simple * Copyright (C) 2008 KnowledgeTree Inc. * Portions copyright The Jam Warehouse Software (Pty) Limited - * + * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 3 as published by the * Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, + * + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, * California 94120-7775, or email info@knowledgetree.com. - * + * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU General Public License version 3. - * + * * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by - * KnowledgeTree" logo and retain the original copyright notice. If the display of the + * KnowledgeTree" logo and retain the original copyright notice. If the display of the * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices - * must display the words "Powered by KnowledgeTree" and retain the original + * must display the words "Powered by KnowledgeTree" and retain the original * copyright notice. * Contributor( s): ______________________________________ */ @@ -568,6 +568,7 @@ class KTSchemaUtil $this->defineIndex('document_transaction_types_lookup','namespace', 'UNIQUE'); $this->defineIndex('document_transactions','session_id'); + $this->defineIndex('document_transactions','user_id'); $this->defineIndex('document_transactions','document_id'); $this->defineIndex('document_types_lookup','name'); diff --git a/sql/mysql/install/data.sql b/sql/mysql/install/data.sql index 8478d12..c9511eb 100644 --- a/sql/mysql/install/data.sql +++ b/sql/mysql/install/data.sql @@ -1724,7 +1724,8 @@ INSERT INTO `upgrades` VALUES (203,'sql*3.5.3*0*3.5.3/saved_search.sql','Fix saved search table to support long expressions.','2008-07-30 00:00:00',1,'upgrade*3.5.3*99*upgrade3.5.3'), (204,'sql*3.5.3*0*3.5.3/preview_column.sql','Adjust Preview Column.','2008-07-30 00:00:00',1,'upgrade*3.5.3*99*upgrade3.5.3'), (205,'sql*3.5.3*0*3.5.3/tag_cloud.sql','Update TagCloud descritption.','2008-07-30 00:00:00',1,'upgrade*3.5.3*99*upgrade3.5.3'), -(206,'upgrade*3.5.3*99*upgrade3.5.3','Upgrade from version 3.5.2 to 3.5.3','2008-07-30 00:00:00',1,'upgrade*3.5.3*99*upgrade3.5.3'); +(206,'sql*3.5.3*0*3.5.3/doc_tran_user_index.sql','Add index on user_id to document transactions table.','2008-07-30 00:00:00',1,'upgrade*3.5.3*99*upgrade3.5.3'), +(207,'upgrade*3.5.3*99*upgrade3.5.3','Upgrade from version 3.5.2 to 3.5.3','2008-07-30 00:00:00',1,'upgrade*3.5.3*99*upgrade3.5.3'); /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */; UNLOCK TABLES; @@ -2655,7 +2656,7 @@ UNLOCK TABLES; LOCK TABLES `zseq_upgrades` WRITE; /*!40000 ALTER TABLE `zseq_upgrades` DISABLE KEYS */; INSERT INTO `zseq_upgrades` VALUES -(206); +(207); /*!40000 ALTER TABLE `zseq_upgrades` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/mysql/install/structure.sql b/sql/mysql/install/structure.sql index 74dadf7..5ec79f7 100644 --- a/sql/mysql/install/structure.sql +++ b/sql/mysql/install/structure.sql @@ -523,6 +523,7 @@ CREATE TABLE `document_transactions` ( PRIMARY KEY (`id`), KEY `session_id` (`session_id`), KEY `document_id` (`document_id`), + KEY `user_id` (`user_id`), KEY `datetime` (`datetime`,`transaction_namespace`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/sql/mysql/upgrade/3.5.3/doc_tran_user_index.sql b/sql/mysql/upgrade/3.5.3/doc_tran_user_index.sql new file mode 100644 index 0000000..41b9d51 --- /dev/null +++ b/sql/mysql/upgrade/3.5.3/doc_tran_user_index.sql @@ -0,0 +1 @@ +alter table `ktdms`.`document_transactions` add index `user_id` (`user_id`); \ No newline at end of file