From 3c08ca5b71422334f3df2f491ff2c3ce94d8390d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 11 Sep 2013 17:12:51 +0200 Subject: [PATCH 1/2] Fixed SQL install script for PostgreSQL --- htdocs/install/mysql/tables/llx_socpeople.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index 04be54ba06c..c46a7ef3aca 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -51,5 +51,5 @@ create table llx_socpeople default_lang varchar(6), canvas varchar(32), -- type of canvas if used (null by default) import_key varchar(14), - statut tinyint(4) + statut tinyint )ENGINE=innodb; From 875f9d55c768ee3738638114339ddf471587c1d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 11 Sep 2013 17:34:35 +0200 Subject: [PATCH 2/2] Fixed tinyint for PostgreSQL in a more generic way --- htdocs/core/db/pgsql.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index cffcee3acd9..8159304f376 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -209,7 +209,7 @@ class DoliDBPgsql extends DoliDB } // tinyint type conversion - $line=str_replace('tinyint','smallint',$line); + $line=preg_replace('/tinyint\(?[0-9]*\)?/','smallint',$line); // nuke unsigned $line=preg_replace('/(int\w+|smallint)\s+unsigned/i','\\1',$line);