Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Little fix, create the seed folder when it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
José Ignacio Amelivia Santiago committed Feb 26, 2015
1 parent 487542e commit 400c4fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,2 +1 @@
seed/*
!seed/.whats-is-in-here
3 changes: 3 additions & 0 deletions mysql-to-seed.php
Expand Up @@ -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");
Expand Down

0 comments on commit 400c4fb

Please sign in to comment.