Commit e0db24aa authored by Phill Sparks's avatar Phill Sparks

Create the bundle migrations dir automatically

parent 9bcbe6a3
...@@ -194,9 +194,14 @@ class Migrator extends Task { ...@@ -194,9 +194,14 @@ class Migrator extends Task {
// next migration at the same time unknowingly. // next migration at the same time unknowingly.
$date = date('Y_m_d').'_'.time(); $date = date('Y_m_d').'_'.time();
$path = Bundle::path($bundle).'migrations/'.$date.'_'.$migration.EXT; $path = Bundle::path($bundle).'migrations'.DIRECTORY_SEPARATOR;
File::put($path, $this->stub($bundle, $migration)); if ( ! is_dir($path))
{
mkdir($path);
}
File::put($path.$date.'_'.$migration.EXT, $this->stub($bundle, $migration));
echo "Great! New migration created!"; echo "Great! New migration created!";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment