Unwrap transaction

This commit is contained in:
Lance Pioch 2024-06-15 07:27:17 -04:00
parent eff8e509ef
commit b24ff8bb26

View File

@ -12,7 +12,6 @@ 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']);
});
@ -39,6 +38,12 @@ return new class extends Migration
}
Schema::table('servers', function (Blueprint $table) {
try {
$table->dropForeign(['allocation_id']);
} catch (Exception) {
// pass
}
$table->dropUnique(['allocation_id']);
$table->dropColumn(['allocation_id']);
});
@ -48,7 +53,6 @@ return new class extends Migration
Schema::table('nodes', function (Blueprint $table) {
$table->boolean('strict_ports')->default(true);
});
});
}
/**