Skip to content

Commit 90bf1da

Browse files
author
Bizley
authored
Fixed condition check for no counter update migration name (#103)
1 parent 65765ce commit 90bf1da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/controllers/MigrationController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,11 +502,12 @@ public function actionUpdate(string $inputTable): int
502502
}
503503
}
504504

505+
$countBlueprints = count($blueprints);
505506
foreach ($blueprints as $tableName => $blueprint) {
506507
$this->stdout("\n > Generating migration for updating table '{$tableName}' ...", Console::FG_YELLOW);
507508

508509
$normalizedTableName = str_replace('.', '_', $tableName);
509-
if ($migrationsGenerated === 0) {
510+
if ($migrationsGenerated === 0 && $countBlueprints === 1) {
510511
$migrationClassName = 'm' . gmdate('ymd_His') . '_update_table_' . $normalizedTableName;
511512
} else {
512513
$migrationClassName = sprintf(

0 commit comments

Comments
 (0)