diff --git a/build/dolibarr_mysql2pgsql.pl b/build/dolibarr_mysql2pgsql.pl
index c2e417c5a9c13c864494461d5abb39212127d0b3..a696acfe07530a0bbb5505ebfb7e6ad309d55205 100644
--- a/build/dolibarr_mysql2pgsql.pl
+++ b/build/dolibarr_mysql2pgsql.pl
@@ -170,7 +170,7 @@ foreach my $file (keys %filelist) {
     		} 
 
             # enum -> check
-    		if (/([\w\"]*)\s+enum\s*\(((?:['"]\w+['"]\s*,)+['"]\w+['"])\)(.*)$/i) {
+    		if (/([\w\"]*)\s+enum\s*\(((?:['"][\?\w]+['"]\s*,)+['"][\?\w]+['"])\)(.*)$/i) {
     			$enum_column=$1;
     			$enum_datafield{$enum_column}=$2;  # 'abc','def', ...
     			my $suite=$3;
diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index a36ff2e1c68ac77b8d70ac19690c1e1a2fbd01a5..09c9915b3a47fb02ac90e69ff50b8c9ca254772b 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -927,7 +927,7 @@ create table llx_bordereau_cheque
   rowid             integer AUTO_INCREMENT PRIMARY KEY,
   datec             datetime,
   date_bordereau    date,
-  number            mediumint ZEROFILL,
+  number            mediumint,
   amount            float(12,2),
   nbcheque          smallint UNSIGNED DEFAULT 0,
   fk_bank_account   integer,
diff --git a/mysql/migration/2.1.0-2.2.0.sql b/mysql/migration/2.1.0-2.2.0.sql
index 26580ac0e9ea3f44dfaf95539ea66c208c488b95..4600d7b40990cc2b12dbf1d58a851547de8f0a63 100644
--- a/mysql/migration/2.1.0-2.2.0.sql
+++ b/mysql/migration/2.1.0-2.2.0.sql
@@ -820,3 +820,6 @@ update llx_boxes set box_order = concat('A0',box_order) where length(box_order)
 update llx_boxes set box_order = concat('B0',box_order) where length(box_order) = 1 and substring(box_order,-1) in ('0','2','4','6','8');
 update llx_boxes set box_order = concat('A',box_order) where length(box_order) = 2 and substring(box_order,-1) in ('1','3','5','7','9');
 update llx_boxes set box_order = concat('B',box_order) where length(box_order) = 2 and substring(box_order,-1) in ('0','2','4','6','8');
+
+
+alter table llx_bordereau_cheque modify number integer;
diff --git a/mysql/tables/llx_bordereau_cheque.sql b/mysql/tables/llx_bordereau_cheque.sql
index b6c897760fcf1452995cd355d1798ae61db2d919..f1f3289ad6c4769319ab5f260152e73c01d7cdba 100644
--- a/mysql/tables/llx_bordereau_cheque.sql
+++ b/mysql/tables/llx_bordereau_cheque.sql
@@ -27,7 +27,7 @@ create table llx_bordereau_cheque
   rowid             integer AUTO_INCREMENT PRIMARY KEY,
   datec             datetime,
   date_bordereau    date,
-  number            mediumint ZEROFILL,
+  number            integer,
   amount            float(12,2),
   nbcheque          smallint UNSIGNED DEFAULT 0,
   fk_bank_account   integer,
diff --git a/mysql/tables/llx_osc_categories.sql b/mysql/tables/llx_osc_categories.sql
index d02e02855e7d8650fd77f53e4bdc3a2cfb636ab9..aeee8062d157143f220396f53b1318f0c600375a 100644
--- a/mysql/tables/llx_osc_categories.sql
+++ b/mysql/tables/llx_osc_categories.sql
@@ -1,20 +1,24 @@
--- phpMyAdmin SQL Dump
--- version 2.6.2-Debian-3sarge3
--- http://www.phpmyadmin.net
--- 
--- Serveur: localhost
--- G�n�r� le : Mercredi 20 Juin 2007 � 15:13
--- Version du serveur: 4.0.24
--- Version de PHP: 4.3.10-19
--- 
--- Base de donn�es: `dolidev`
--- 
-
--- --------------------------------------------------------
-
--- 
--- Structure de la table `llx_osc_categories`
--- 
+-- ===================================================================
+-- Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 2 of the License, or
+-- (at your option) any later version.
+--
+-- 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, write to the Free Software
+-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+--
+-- $Id$
+-- $Source$
+--
+-- ===================================================================
 
 CREATE TABLE llx_osc_categories (
   rowid int(11) unsigned NOT NULL auto_increment,
diff --git a/mysql/tables/llx_osc_customer.sql b/mysql/tables/llx_osc_customer.sql
index 491b7d0f8b6d2e24f19afb61a09c317f27b87746..182d111d81b4e4dd3cd757c812ab1670be171466 100644
--- a/mysql/tables/llx_osc_customer.sql
+++ b/mysql/tables/llx_osc_customer.sql
@@ -20,10 +20,10 @@
 --
 -- ===================================================================
 
-CREATE TABLE IF NOT EXISTS `llx_osc_customer` (
-  `rowid` int(11) NOT NULL default '0',
-  `datem` datetime default NULL,
-  `fk_soc` int(11) NOT NULL default '0',
-  PRIMARY KEY  (`rowid`),
-  UNIQUE KEY `fk_soc` (`fk_soc`)
+CREATE TABLE llx_osc_customer (
+  rowid int(11) NOT NULL default '0',
+  datem datetime default NULL,
+  fk_soc int(11) NOT NULL default '0',
+  PRIMARY KEY  (rowid),
+  UNIQUE KEY fk_soc (fk_soc)
 ) TYPE=InnoDB COMMENT='Table transition client OSC - societe Dolibarr';
diff --git a/mysql/tables/llx_osc_order.sql b/mysql/tables/llx_osc_order.sql
index 14c6a872bc2a21c8f66d07727e309af98a7e3e33..5ff171d556ca51a21042f489826fc8f011c99f15 100644
--- a/mysql/tables/llx_osc_order.sql
+++ b/mysql/tables/llx_osc_order.sql
@@ -20,10 +20,10 @@
 --
 -- ===================================================================
 
-CREATE TABLE IF NOT EXISTS `llx_osc_order` (
-  `rowid` int(11) NOT NULL default '0',
-  `datem` datetime default NULL,
-  `fk_commande` int(11) NOT NULL default '0',
-  PRIMARY KEY  (`rowid`),
-  UNIQUE KEY `fk_commande` (`fk_commande`)
+CREATE TABLE llx_osc_order (
+  rowid int(11) NOT NULL default '0',
+  datem datetime default NULL,
+  fk_commande int(11) NOT NULL default '0',
+  PRIMARY KEY  (rowid),
+  UNIQUE KEY fk_commande (fk_commande)
 ) TYPE=InnoDB COMMENT='Table transition commande OSC - commande Dolibarr';
diff --git a/mysql/tables/llx_osc_product.sql b/mysql/tables/llx_osc_product.sql
index ff10752e5157ec71a6ca9632a4c8c5ca4778b73a..8c7d8dfa3e647d1885b1a6004e6390532ea707f4 100644
--- a/mysql/tables/llx_osc_product.sql
+++ b/mysql/tables/llx_osc_product.sql
@@ -20,12 +20,12 @@
 --
 -- ===================================================================
 
-CREATE TABLE IF NOT EXISTS `llx_osc_product` (
-  `rowid` int(11) NOT NULL default '0',
-  `datem` datetime default NULL,
-  `fk_product` int(11) NOT NULL default '0',
-  PRIMARY KEY  (`rowid`),
-  UNIQUE KEY `fk_product` (`fk_product`)
+CREATE TABLE llx_osc_product (
+  rowid int(11) NOT NULL default '0',
+  datem datetime default NULL,
+  fk_product int(11) NOT NULL default '0',
+  PRIMARY KEY  (rowid),
+  UNIQUE KEY fk_product (fk_product)
 ) TYPE=InnoDB COMMENT='Table transition produit OSC - produit Dolibarr';