FIX nuke DEFAULT CURRENT_TIMESTAMP in pgsql
This commit is contained in:
parent
111f73bd86
commit
0dc24c87b8
@ -234,8 +234,11 @@ class DoliDBPgsql extends DoliDB
|
|||||||
// on update defaulted by now
|
// on update defaulted by now
|
||||||
$line = preg_replace('/(\s*)tms(\s*)timestamp/i', '\\1tms timestamp without time zone DEFAULT now() NOT NULL', $line);
|
$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
|
// 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)
|
// unique index(field1,field2)
|
||||||
if (preg_match('/unique index\s*\((\w+\s*,\s*\w+)\)/i', $line))
|
if (preg_match('/unique index\s*\((\w+\s*,\s*\w+)\)/i', $line))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user