diff --git a/lib/documentmanagement/documentcontentversion.inc.php b/lib/documentmanagement/documentcontentversion.inc.php index 7d62f10..e21202e 100644 --- a/lib/documentmanagement/documentcontentversion.inc.php +++ b/lib/documentmanagement/documentcontentversion.inc.php @@ -6,7 +6,7 @@ * License Version 1.1.2 ("License"); You may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.knowledgetree.com/KPL - * + * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * See the License for the specific language governing rights and @@ -17,9 +17,9 @@ * (ii) the KnowledgeTree copyright notice * in the same form as they appear in the distribution. See the License for * requirements. - * + * * The Original Code is: KnowledgeTree Open Source - * + * * The Initial Developer of the Original Code is The Jam Warehouse Software * (Pty) Ltd, trading as KnowledgeTree. * Portions created by The Jam Warehouse Software (Pty) Ltd are Copyright @@ -103,7 +103,7 @@ class KTDocumentContentVersion extends KTEntity { $this->iSize = 0; } if (empty($this->iMimeTypeId)) { - $this->iMimeTypeId = 0; + $this->iMimeTypeId = 9; } if (is_null($this->iMajorVersion)) { $this->iMajorVersion = 0; diff --git a/sql/mysql/upgrade/3.5.0/relation_friendly.sql b/sql/mysql/upgrade/3.5.0/relation_friendly.sql index ce2aa91..bdb3099 100644 --- a/sql/mysql/upgrade/3.5.0/relation_friendly.sql +++ b/sql/mysql/upgrade/3.5.0/relation_friendly.sql @@ -3,3 +3,8 @@ alter table `folders` change `owner_id` `owner_id` int NULL; alter table `index_files` change `document_id` `document_id` int NOT NULL; alter table `index_files` change `user_id` `user_id` int NOT NULL; alter table `type_workflow_map` change `workflow_id` `workflow_id` int NULL; +alter table document_content_version change mime_id mime_id int null default 9; +alter table documents change owner_id owner_id int null; +alter table documents change parent_id parent_id int null; +update documents set owner_id=null where owner_id=0; +update folders set parent_id=null where parent_id=0;