diff --git a/src/NewCommand.php b/src/NewCommand.php index dd0814a..242295d 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -208,9 +208,18 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->configureDefaultDatabaseConnection($directory, $database, $name); if ($migrate) { - $this->runCommands([ - $this->phpBinary().' artisan migrate', - ], $input, $output, workingPath: $directory); + if ($database === 'sqlite') { + touch($directory.'/database/database.sqlite'); + } + + $commands = [ + trim(sprintf( + $this->phpBinary().' artisan migrate %s', + ! $input->isInteractive() ? '--no-interaction' : '', + )), + ]; + + $this->runCommands($commands, $input, $output, workingPath: $directory); } }