Skip to content

Commit

Permalink
[7.x] Fix workbench:install generating migrate-fresh command with i…
Browse files Browse the repository at this point in the history
…ncorrect options (#66)

* [7.x] Fix `workbench:install` generating `migrate-fresh` command with
incorrect options

fixes #65

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

---------

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone authored Dec 17, 2024
1 parent 4d91282 commit 2e1b54e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ protected function copyTestbenchConfigurationFile(Filesystem $filesystem, string
'{{WorkbenchDatabaseSeeder}}',
'{{ WorkbenchDatabaseSeeder }}',
'Workbench\Database\Seeders\DatabaseSeeder',

' - migrate-fresh',
],
[
$workbenchAppNamespacePrefix,
Expand All @@ -126,6 +128,10 @@ protected function copyTestbenchConfigurationFile(Filesystem $filesystem, string
$databaseSeeder,
$databaseSeeder,
$databaseSeeder,

$databaseSeeder === 'Database\Seeders\DatabaseSeeder'
? ' - migrate-fresh'
: ' - migrate-fresh:'.PHP_EOL.' --seed: true',
],
$to
);
Expand Down
3 changes: 1 addition & 2 deletions src/Console/stubs/testbench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ workbench:
- asset-publish
- create-sqlite-db
- db-wipe
- migrate-fresh:
--seed: true
- migrate-fresh
assets:
- laravel-assets
sync: []

0 comments on commit 2e1b54e

Please sign in to comment.