From dcf2fa243ff263c9e26a3379c9549548a37fb457 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 21 Sep 2010 21:12:18 +0000 Subject: [PATCH] Fix: Do not increase this as file+note must be small to allow index --- htdocs/install/mysql/migration/2.8.0-2.9.0.sql | 3 ++- htdocs/install/mysql/tables/llx_boxes_def.sql | 14 +++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/htdocs/install/mysql/migration/2.8.0-2.9.0.sql b/htdocs/install/mysql/migration/2.8.0-2.9.0.sql index 17a52fbd777..33177736382 100755 --- a/htdocs/install/mysql/migration/2.8.0-2.9.0.sql +++ b/htdocs/install/mysql/migration/2.8.0-2.9.0.sql @@ -319,7 +319,8 @@ DELETE from llx_const where name='USER_PASSWORD_GENERATED' and value='default'; ALTER TABLE llx_boxes_def DROP INDEX uk_boxes_def; -ALTER TABLE llx_boxes_def MODIFY note varchar(255); +ALTER TABLE llx_boxes_def MODIFY file varchar(200) NOT NULL; +ALTER TABLE llx_boxes_def MODIFY note varchar(140); ALTER TABLE llx_boxes_def ADD UNIQUE INDEX uk_boxes_def (file, entity, note); -- Fix bad old data diff --git a/htdocs/install/mysql/tables/llx_boxes_def.sql b/htdocs/install/mysql/tables/llx_boxes_def.sql index be558cd247d..dab336246d2 100644 --- a/htdocs/install/mysql/tables/llx_boxes_def.sql +++ b/htdocs/install/mysql/tables/llx_boxes_def.sql @@ -22,16 +22,8 @@ create table llx_boxes_def ( rowid integer AUTO_INCREMENT PRIMARY KEY, - file varchar(255) NOT NULL, + file varchar(200) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id tms timestamp, - note varchar(255) -)type=innodb; - --- --- List of codes for the field "entity" --- --- 1 : first company boxes --- 2 : second company boxes --- 3 : etc... --- \ No newline at end of file + note varchar(140) +)type=innodb; \ No newline at end of file