diff --git a/.gitignore b/.gitignore index 127c307..53c4a07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ seed/* -!seed/.whats-is-in-here diff --git a/mysql-to-seed.php b/mysql-to-seed.php index 22b60e8..fb04e81 100755 --- a/mysql-to-seed.php +++ b/mysql-to-seed.php @@ -16,6 +16,9 @@ if (!$result){ echo("The table ".$tableName." is not present in the database and will be ignored\n"); } else { + if (!file_exists('./seed')) { + mkdir('./seed', 0777, true); + } echo("Processing the table ".$tableName."\n"); $filePath = "seed/".snake_to_camel($tableName)."TableSeeder.php"; $file = fopen($filePath, "w");