diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 3c49bcf6f4b..d24b4e98189 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -234,8 +234,11 @@ class DoliDBPgsql extends DoliDB // on update defaulted by now $line = preg_replace('/(\s*)tms(\s*)timestamp/i', '\\1tms timestamp without time zone DEFAULT now() NOT NULL', $line); + // nuke DEFAULT CURRENT_TIMESTAMP + $line = preg_replace('/(\s*)DEFAULT(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); + // nuke ON UPDATE CURRENT_TIMESTAMP - $line = preg_replace('/(\s*)on(\s*)update(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); + $line = preg_replace('/(\s*)ON(\s*)UPDATE(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); // unique index(field1,field2) if (preg_match('/unique index\s*\((\w+\s*,\s*\w+)\)/i', $line))