From 25f63fb982130444be77cf9f438d2aa510ac3a8a Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sun, 24 Aug 2014 22:46:53 +0300 Subject: [PATCH] ensure directory exists --- src/migrations.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/migrations.php b/src/migrations.php index 0711854..cf75a89 100644 --- a/src/migrations.php +++ b/src/migrations.php @@ -49,6 +49,9 @@ class Migrations if ($name) $name = '_'.$name; + if (!is_dir($path)) + mkdir($path, 0777, true); + $filename = $path.'/'.$ts.$name.'.php'; file_put_contents($filename, "