Skip to content

Commit 5b516fa

Browse files
authored
Separate the migration run from the install command (#60)
1 parent 3de99c9 commit 5b516fa

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

krait/src/Console/InstallCommand.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ public function handle(): int
3838
{
3939
$this->info('Publishing assets...');
4040

41-
$alreadyMigrated = Schema::hasTable('krait_preview_configurations');
4241
$tags = 'krait-config|krait-js';
43-
if ($alreadyMigrated) {
42+
if (Schema::hasTable('krait_preview_configurations')) {
4443
$tags = "$tags|krait-migrations";
4544
}
4645
$this->callSilent('vendor:publish', [
@@ -50,14 +49,6 @@ public function handle(): int
5049
$this->registerKraitProvider();
5150
$this->components->info('Assets published successfully ✅');
5251

53-
if (! $alreadyMigrated) {
54-
$this->info('Running DB migrations...');
55-
$this->callSilent('migrate');
56-
$this->components->info('Migrations ran successfully ✅');
57-
} else {
58-
$this->info('Skipping the migrations as the table exists...');
59-
}
60-
6152
if (empty($this->option('dev'))) {
6253
$this->installJsPackage();
6354
}

0 commit comments

Comments
 (0)