Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/Dacapo/Presentation/Console/DacapoInitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class DacapoInitCommand extends Command
* @var string
*/
protected $signature = 'dacapo:init
{--no-clear : Do not execute the dacapo:clear command}
{--no-migrate : Do not migrate}
{--laravel6 : Laravel 6.x default schema}
{--laravel7 : Laravel 7.x default schema}
{--laravel8 : Laravel 8.x default schema}
Expand All @@ -41,10 +41,6 @@ public function handle(Filesystem $filesystem): void
$filesystem->makeDirectory($schemasPath);
}

if ($this->option('no-clear') === false) {
$this->call('dacapo:clear', ['--force' => true, '--all' => true]);
}

$version = 'laravel8';

if ($this->option('laravel8')) {
Expand All @@ -60,5 +56,6 @@ public function handle(Filesystem $filesystem): void
file_put_contents($to, file_get_contents($from));

$this->line('<fg=green>Generated:</> database/schemas/default.yml');
$this->call('dacapo', ['--no-migrate' => $this->option('no-migrate')]);
}
}
2 changes: 1 addition & 1 deletion tests/Application/UseCase/DacapoInitCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ final class DacapoInitCommandTest extends TestCase
public function testResolve(): void
{
$this->app->register(ConsoleServiceProvider::class);
$this->artisan('dacapo:init')->assertExitCode(0);
$this->artisan('dacapo:init', ['--no-migrate' => true])->assertExitCode(0);
}
}
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ abstract class TestCase extends OrchestraTestCase
* Call artisan command and return code.
*
* @param string $command
* @param array<string> $parameters
* @param array<string, mixed> $parameters
* @return PendingCommand
*/
public function artisan($command, $parameters = []): PendingCommand
Expand Down