do prod migration with custom command

This commit is contained in:
Andras Bacsai committed 2024-12-11 17:01:06 +01:00
1 parent 1908d8a180
commit a5b48caeb9
3 files changed
+29 -3

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
<?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 --isolated');
exit(0);
} else {
$this->info('Migration is disabled on this server.');
exit(0);
}
}
}