From 60899541a3fb668a8fe4e4ddd2c46dafbf404244 Mon Sep 17 00:00:00 2001 From: ucan-lab <35098175+ucan-lab@users.noreply.github.com> Date: Tue, 1 Mar 2022 23:10:36 +0900 Subject: [PATCH] fix dacapo:init Base table or view already exists: 1050 Table 'users' already exists (#186) --- src/Dacapo/Presentation/Console/DacapoInitCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dacapo/Presentation/Console/DacapoInitCommand.php b/src/Dacapo/Presentation/Console/DacapoInitCommand.php index 607885bd..b6a88a88 100644 --- a/src/Dacapo/Presentation/Console/DacapoInitCommand.php +++ b/src/Dacapo/Presentation/Console/DacapoInitCommand.php @@ -43,8 +43,9 @@ public function handle(Filesystem $filesystem): void $from = __DIR__ . '/DacapoInitCommand/' . $version . '.yml'; $to = $this->laravel->databasePath('schemas/default.yml'); file_put_contents($to, file_get_contents($from)); - $this->line('Generated: database/schemas/default.yml'); + + $this->call('dacapo:clear', ['--all']); $this->call('dacapo', ['--no-migrate' => $this->option('no-migrate')]); } }