diff --git a/tools/modelGenerator.php b/tools/modelGenerator.php index 6f38168..30d8c9e 100755 --- a/tools/modelGenerator.php +++ b/tools/modelGenerator.php @@ -110,9 +110,10 @@ class modelGenerator } $f .= " ));\n\n"; $f .= " // The primary key\n"; - $f .= " \$this->primary (\"".$schema["primary"]."\");\n\n"; + $f .= " \$this->primary (\"".$schema["primary"]."\");\n"; if (count ($schema["unique"])) { + $f .= "\n"; $f .= " // The unique constraints\n"; $f .= " \$this->unique (array (\n"; foreach ($schema["unique"] as $unique) @@ -130,9 +131,10 @@ class modelGenerator { $f .= " \"$field\" => _(\"$field\"),\n"; } - $f .= " );\n\n"; + $f .= " );\n"; if (count ($schema["foreign"])) { + $f .= "\n"; $f .= " // The foreign constraints\n"; $f .= " \$this->foreign = array (\n"; foreach ($schema["foreign"] as $field=>$params)