From 628dabf3e640a96fde998cb9c1172b79e47efd40 Mon Sep 17 00:00:00 2001 From: conradverm Date: Thu, 11 Oct 2007 17:15:09 +0000 Subject: [PATCH] KTS-2442 "Some database tables use unsigned int, but relations are mostly to signed int fields. This means foreign key constraints cannot be added easily." Fixed. Meant to update folders table, not documents. --- sql/mysql/upgrade/3.5.0/relation_friendly.sql | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/sql/mysql/upgrade/3.5.0/relation_friendly.sql b/sql/mysql/upgrade/3.5.0/relation_friendly.sql index aa2820e..e682449 100644 --- a/sql/mysql/upgrade/3.5.0/relation_friendly.sql +++ b/sql/mysql/upgrade/3.5.0/relation_friendly.sql @@ -3,8 +3,19 @@ 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 creator_id creator_id int null; +alter table documents change modified_user_id modified_user_id int null; + +alter table document_transactions change document_id document_id int null; +alter table document_transactions change user_id user_id int null; + +alter table folder_transactions change folder_id folder_id int null; +alter table folder_transactions change user_id user_id int null; + alter table folders 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; -- libgit2 0.21.4