From 6769cbbd2cca22749c92d8ac3bb2b88d05870dd0 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 2 Jul 2012 17:47:16 +0200
Subject: [PATCH] Increase size of ref for products

---
 htdocs/install/mysql/migration/3.2.0-3.3.0.sql | 7 ++++++-
 htdocs/install/mysql/tables/llx_product.sql    | 4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
index a6790fd7106..24a92e8854e 100755
--- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
+++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
@@ -35,4 +35,9 @@ ALTER TABLE llx_commande_fournisseur CHANGE COLUMN date_cloture date_approve dat
 ALTER TABLE llx_commande_fournisseur CHANGE COLUMN fk_user_cloture fk_user_approve integer;
 
 ALTER TABLE llx_mailing MODIFY COLUMN body mediumtext;
-ALTER TABLE llx_mailing ADD COLUMN extraparams varchar(255);
\ No newline at end of file
+ALTER TABLE llx_mailing ADD COLUMN extraparams varchar(255);
+
+
+ALTER TABLE llx_product MODIFY ref                       varchar(128)  NOT NULL;
+ALTER TABLE llx_product MODIFY ref_ext                   varchar(128);
+
diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql
index e5d68032cb9..f8faa8f59e6 100644
--- a/htdocs/install/mysql/tables/llx_product.sql
+++ b/htdocs/install/mysql/tables/llx_product.sql
@@ -22,10 +22,10 @@
 create table llx_product
 (
   rowid						integer AUTO_INCREMENT PRIMARY KEY,
-  ref                       varchar(32)  NOT NULL,
+  ref                       varchar(128)  NOT NULL,
   entity                    integer   DEFAULT 1 NOT NULL,   -- Multi company id
 
-  ref_ext                   varchar(32),                    -- reference into an external system (not used by dolibarr)
+  ref_ext                   varchar(128),                    -- reference into an external system (not used by dolibarr)
 
   datec						datetime,
   tms						timestamp,
-- 
GitLab