Skip to content

Commit

Permalink
Add loop control for migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhj committed Mar 4, 2024
1 parent 8d30b96 commit 6cc2c91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core-bundle/src/Command/MigrateCommand.php
Expand Up @@ -51,6 +51,8 @@ class MigrateCommand extends Command
private ?Installer $installer;
private ?SymfonyStyle $io = null;

private int $migrationsLoopControl = 9;

public function __construct(MigrationCollection $migrations, FileLocator $fileLocator, string $projectDir, ContaoFramework $framework, BackupManager $backupManager, SchemaProvider $schemaProvider, MysqlInnodbRowSizeCalculator $rowSizeCalculator, Connection $connection, Installer $installer = null)
{
$this->migrations = $migrations;
Expand Down Expand Up @@ -250,7 +252,7 @@ private function hasWorkToDo(): bool

private function executeMigrations(bool &$dryRun, bool $asJson, string $specifiedHash = null): bool
{
while (true) {
while (--$this->migrationsLoopControl) {
$first = true;
$migrationLabels = [];

Expand Down

0 comments on commit 6cc2c91

Please sign in to comment.