coolify/app/Console/Commands/Migration.php

24 lines
566 B
PHP
Raw Normal View History

2024-12-11 16:01:06 +00:00
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class Migration extends Command
{
protected $signature = 'start:migration';
protected $description = 'Start Migration';
public function handle()
{
if (config('constants.migration.is_migration_enabled')) {
$this->info('Migration is enabled on this server.');
$this->call('migrate', ['--force' => true, '--isolated' => true]);
2024-12-11 16:01:06 +00:00
exit(0);
}
2025-01-07 13:52:08 +00:00
$this->info('Migration is disabled on this server.');
exit(0);
2024-12-11 16:01:06 +00:00
}
}