Skip to content

Commit

Permalink
Builder InstallCommand (#384)
Browse files Browse the repository at this point in the history
Co-authored-by: KimSpeer <[email protected]>
Co-authored-by: Kim-the-Diamond <[email protected]>
  • Loading branch information
3 people authored Mar 7, 2024
1 parent 54fd594 commit 4f136a3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/builder/src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,13 @@ public function publish_configuration(): void

public function publish_migrations(): void
{
$confirmed = confirm('Do you wish to publish the migrations?', true);
if ($confirmed) {
if (Schema::hasTable('items')) {
warning('The items table already exists. The migrations will not be published.');
} elseif (confirm('Do you wish to publish the migrations?', true)) {
info('Publishing Builder Migrations...');
$this->callSilent('vendor:publish', ['--tag' => 'builder-migrations']);
}
if (Schema::hasTable('items')) {
warning('The items table already exists. The migrations will not be published.');
} elseif (confirm('Do you wish to publish the migrations?', true)) {
info('Publishing Builder Migrations...');
$this->callSilent('vendor:publish', ['--tag' => 'builder-migrations']);
}

}

public function run_migrations(): void
Expand Down

0 comments on commit 4f136a3

Please sign in to comment.