Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function main() |
||
20 | { |
||
21 | $this->migrationFilesPath = CONFIG . 'Migrations/'; |
||
22 | //Creates the directory if it does not exists |
||
23 | file_exists($this->migrationFilesPath) || mkdir($this->migrationFilesPath, 0777, true); |
||
24 | //All migration files |
||
25 | $srcMigrationFiles = $this->findMigrationFiles(__DIR__ . '/../../database/migrations'); |
||
26 | foreach ($srcMigrationFiles as $file) { |
||
27 | $result = $this->processMigrationFile($file); |
||
28 | if (!$result) { |
||
29 | throw new RuntimeException(sprintf('Fail to copy migration file "%s"', $file)); |
||
30 | } |
||
31 | } |
||
32 | $this->out('Migrate ok, please execute command "./cake migrations migrate"'); |
||
33 | } |
||
34 | |||
52 | } |