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] 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);