diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
index bae240b5ed57eb6f8bf58af5686d3100031aa534..1db0fe41fb935c90fab0000fc45f7a6b2adf0c06 100755
--- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
+++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql
@@ -1,5 +1,5 @@
 --
--- $Id: 3.0.0-3.1.0.sql,v 1.85 2011/08/03 10:55:39 simnandez Exp $
+-- $Id: 3.0.0-3.1.0.sql,v 1.86 2011/08/08 16:07:33 hregis Exp $
 --
 -- Be carefull to requests order.
 -- This file must be loaded by calling /install/index.php page
@@ -483,3 +483,6 @@ ALTER TABLE llx_don ADD   phone           varchar(24) after email;
 
 ALTER TABLE llx_user ADD civilite varchar(6) after entity;
 
+ALTER TABLE llx_advanced_extrafields_options DROP COLUMN tms;
+ALTER TABLE llx_advanced_extrafields_options CHANGE COLUMN rang pos integer;
+ALTER TABLE llx_advanced_extrafields CHANGE COLUMN rang pos integer;
diff --git a/htdocs/install/mysql/tables/llx_advanced_extrafields.sql b/htdocs/install/mysql/tables/llx_advanced_extrafields.sql
index ade41da746e964344f659ffcdba41fd3885688f6..02344d027e4cb9edb7df27a0f86d1ffdabfa5e78 100755
--- a/htdocs/install/mysql/tables/llx_advanced_extrafields.sql
+++ b/htdocs/install/mysql/tables/llx_advanced_extrafields.sql
@@ -1,5 +1,5 @@
 -- ===================================================================
--- Copyright (C) 2010 Regis Houssin  <regis@dolibarr.fr>
+-- Copyright (C) 2010-2011 Regis Houssin  <regis@dolibarr.fr>
 --
 -- 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
@@ -14,7 +14,7 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program. If not, see <http://www.gnu.org/licenses/>.
 --
--- $Id: llx_advanced_extrafields.sql,v 1.2 2011/08/03 01:25:29 eldy Exp $
+-- $Id: llx_advanced_extrafields.sql,v 1.3 2011/08/08 16:07:33 hregis Exp $
 -- ===================================================================
 
 create table llx_advanced_extrafields
@@ -26,9 +26,11 @@ create table llx_advanced_extrafields
   elementtype			varchar(64) NOT NULL,           -- type of link 'invoice', 'order', 'proposal', 'invoice_supplier', 'order_supplier'
   name 					varchar(64) NOT NULL,           -- code name of field
   label					varchar(64) NOT NULL,
-  format				varchar(8) 	NOT NULL,           -- date, string, integer, float
+  type					varchar(8) 	NOT NULL,           -- date, string, integer, float
   fieldsize 			integer,
   maxlength 			integer,
   options 				varchar(255),
-  rang 					integer
+  
+  pos 					integer
+  
 )ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_advanced_extrafields_options.sql b/htdocs/install/mysql/tables/llx_advanced_extrafields_options.sql
index 015a9e9b4c02a3d9fad228c90322162f07edd588..83e830286e3d0359f13985067e2dc01f1fdd01e2 100755
--- a/htdocs/install/mysql/tables/llx_advanced_extrafields_options.sql
+++ b/htdocs/install/mysql/tables/llx_advanced_extrafields_options.sql
@@ -1,5 +1,5 @@
 -- ===================================================================
--- Copyright (C) 2010 Regis Houssin  <regis@dolibarr.fr>
+-- Copyright (C) 2010-2011 Regis Houssin  <regis@dolibarr.fr>
 --
 -- 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
@@ -14,17 +14,16 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program. If not, see <http://www.gnu.org/licenses/>.
 --
--- $Id: llx_advanced_extrafields_options.sql,v 1.2 2011/08/03 01:25:26 eldy Exp $
+-- $Id: llx_advanced_extrafields_options.sql,v 1.3 2011/08/08 16:07:33 hregis Exp $
 -- ===================================================================
 
 create table llx_advanced_extrafields_options
 (
   rowid                 integer AUTO_INCREMENT PRIMARY KEY,
-  tms                   timestamp,
   
   fk_extrafields 		integer NOT NULL,
   value 				varchar(255) NOT NULL,
   
-  rang 					integer
+  pos 					integer
   
 )ENGINE=innodb;