diff --git a/pg2mysql.inc.php b/pg2mysql.inc.php index 65715f8..b01899a 100644 --- a/pg2mysql.inc.php +++ b/pg2mysql.inc.php @@ -237,6 +237,9 @@ function pg2mysql($input, $header=true) $line=str_replace(" timestamp DEFAULT now()"," timestamp DEFAULT CURRENT_TIMESTAMP",$line); $line=preg_replace("/ timestamp( NOT NULL)?(,|$)/",' timestamp DEFAULT 0${1}${2}',$line); + // Remove defaults pointing to functions + $line=preg_replace("/ DEFAULT .*\(\)/", "", $line); + if(strstr($line,"auto_increment")) { $field=getfieldname($line); $tbl_extra.=", " . $config['autoincrement_key_type'] . "(`$field`)\n";