Skip to content
Snippets Groups Projects
Commit a87cefa6 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: pgsql

parent c4daa904
No related branches found
No related tags found
No related merge requests found
......@@ -278,7 +278,8 @@ class DoliDBPgsql
// ALTER TABLE llx_tablechild ADD CONSTRAINT fk_tablechild_fk_fieldparent FOREIGN KEY (fk_fieldparent) REFERENCES llx_tableparent (rowid)
if (preg_match('/ALTER\s+TABLE\s+(.*)\s*ADD CONSTRAINT\s+(.*)\s*FOREIGN\s+KEY\s*(.*)$/i',$line,$reg))
{
$line.=" DEFERRABLE INITIALLY IMMEDIATE";
$line=preg_replace('/;$/','',$line);
$line.=" DEFERRABLE INITIALLY IMMEDIATE;";
}
// alter table add [unique] [index] (field1, field2 ...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment