Skip to content

Commit

Permalink
Fix: pgsql
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 13, 2012
1 parent c4daa90 commit a87cefa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/core/db/pgsql.class.php
Expand Up @@ -278,7 +278,8 @@ static function convertSQLFromMysql($line,$type='auto',$unescapeslashquot=0)
// 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 ...)
Expand Down

0 comments on commit a87cefa

Please sign in to comment.