Index: trunk/phase3/includes/DatabaseSqlite.php |
— | — | @@ -354,6 +354,10 @@ |
355 | 355 | $sql = str_replace(' unsigned','',$sql); |
356 | 356 | $sql = str_replace(' int ',' INTEGER ',$sql); |
357 | 357 | $sql = str_replace('NOT NULL','',$sql); |
| 358 | + |
| 359 | + # Tidy up and write file |
| 360 | + $sql = preg_replace('/^\s*^/m','',$sql); # Remove empty lines |
| 361 | + $sql = preg_replace('/;$/m',";\n",$sql); # Separate each statement with an empty line |
358 | 362 | file_put_contents($sqlite_tmpl,$sql); |
359 | 363 | } |
360 | 364 | |