mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-15 14:01:09 +02:00
Wrap in transaction
This commit is contained in:
parent
6976fa8989
commit
eff8e509ef
@ -2,6 +2,7 @@
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
@ -11,6 +12,7 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
DB::transaction(function () {
|
||||
Schema::table('server_transfers', function (Blueprint $table) {
|
||||
$table->dropColumn(['old_allocation', 'new_allocation', 'old_additional_allocations', 'new_additional_allocations']);
|
||||
});
|
||||
@ -37,7 +39,7 @@ return new class extends Migration
|
||||
}
|
||||
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
$table->dropForeign(['allocation_id']);
|
||||
$table->dropUnique(['allocation_id']);
|
||||
$table->dropColumn(['allocation_id']);
|
||||
});
|
||||
|
||||
@ -46,6 +48,7 @@ return new class extends Migration
|
||||
Schema::table('nodes', function (Blueprint $table) {
|
||||
$table->boolean('strict_ports')->default(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user