Skip to content

Commit

Permalink
Reset the migrations in one command
Browse files Browse the repository at this point in the history
Replace resetting the migrations one by one to Block of migrations
  • Loading branch information
MoamenEltouny committed Dec 15, 2022
1 parent 2c731ce commit 30676e4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Core/Commands/MigrateReset.php
Expand Up @@ -29,12 +29,9 @@ public function exec()
return strpos($line, 'not found') === false;
});

foreach ($files as $file) {
$command = "migrate:reset --realpath --path=" . $path . DIRECTORY_SEPARATOR . $file;
if ($this->option('force')) $command .= ' --force';

Artisan::call($command, [], $output);
}
$command = "migrate:reset --realpath --path=" . $path;
if ($this->option('force')) $command .= ' --force';
Artisan::call($command, [], $output);

return 0;
}
Expand Down

0 comments on commit 30676e4

Please sign in to comment.