| @@ 355-367 (lines=13) @@ | ||
| 352 | */ |
|
| 353 | protected function generateMigration(array $metadatas, array &$fsList = array(), $pluginCode, $codePath) |
|
| 354 | { |
|
| 355 | if (count($metadatas)) { |
|
| 356 | $migrationContent = $this->makeMigration($pluginCode, $metadatas); |
|
| 357 | $date = date('YmdHis'); |
|
| 358 | $migrationContent = str_replace('[datetime]', $date, $migrationContent); |
|
| 359 | $migPath = $codePath.'/Resource/doctrine/migration/Version'.$date.'.php'; |
|
| 360 | ||
| 361 | file_put_contents($migPath, $migrationContent); |
|
| 362 | if (is_file($migPath)) { |
|
| 363 | $fsList['file'][$migPath] = true; |
|
| 364 | } else { |
|
| 365 | $fsList['file'][$migPath] = false; |
|
| 366 | } |
|
| 367 | } |
|
| 368 | } |
|
| 369 | ||
| 370 | ||
| @@ 117-129 (lines=13) @@ | ||
| 114 | } |
|
| 115 | ||
| 116 | //Migration作成 |
|
| 117 | if (count($metadetas)) { |
|
| 118 | $migrationContent = $this->makeMigration($pluginCode, $metadetas); |
|
| 119 | $timeSt = date('YmdHis'); |
|
| 120 | $migrationContent = str_replace('[datetime]', $timeSt, $migrationContent); |
|
| 121 | $migPath = $codePath . '/Resource/doctrine/migration/Version' . $timeSt . '.php'; |
|
| 122 | ||
| 123 | file_put_contents($migPath, $migrationContent); |
|
| 124 | if (is_file($migPath)) { |
|
| 125 | $fsList['file'][$migPath] = true; |
|
| 126 | } else { |
|
| 127 | $fsList['file'][$migPath] = false; |
|
| 128 | } |
|
| 129 | } |
|
| 130 | ||
| 131 | $dirFileNg = array(); |
|
| 132 | $dirFileOk = array(); |
|