diff --git a/src/Console/Commands/InstallCommand.php b/src/Console/Commands/InstallCommand.php index 7842e26..858fa34 100644 --- a/src/Console/Commands/InstallCommand.php +++ b/src/Console/Commands/InstallCommand.php @@ -102,12 +102,15 @@ public function handle(): int // Step 3: Run migrations if (!$this->option('skip-migrations')) { - $this->info('Step 3: Running migrations...'); - $exitCode = Artisan::call('migrate', [], $this->output); + $this->info('Step 3: Publishing migrations...'); + $exitCode = Artisan::call('vendor:publish', [ + '--tag' => 'filemanager-migrations', + '--force' => $this->option('force'), + ], $this->output); if ($exitCode === 0) { - $steps[] = ['status' => 'success', 'message' => 'Database migrations completed']; + $steps[] = ['status' => 'success', 'message' => 'Migrations published successfully']; } else { - $steps[] = ['status' => 'warning', 'message' => 'Migrations had issues']; + $steps[] = ['status' => 'warning', 'message' => 'Migrations publish had issues']; } $this->newLine(); } diff --git a/src/FileManagerServiceProvider.php b/src/FileManagerServiceProvider.php index 6361874..f192351 100644 --- a/src/FileManagerServiceProvider.php +++ b/src/FileManagerServiceProvider.php @@ -54,9 +54,7 @@ public function configurePackage(Package $package): void ->hasViews() ->hasMigrations([ 'create_file_system_items_table', - 'add_unique_constraint_to_file_system_items_table', ]) - ->runsMigrations() ->hasCommands([ FileSystemListCommand::class, InstallCommand::class,