Implement VM provision locking mechanism and enhance VM job handling

This commit is contained in:
baodev0
2026-07-13 11:23:53 +07:00
parent 0976e23d1a
commit 8d3410f8cc
11 changed files with 143 additions and 131 deletions
@@ -0,0 +1,24 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('vm_provision_locks', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('customer_id')->index();
$table->unsignedBigInteger('order_item_id')->unique();
$table->enum('status', ['running', 'success', 'failed'])->default('running');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('vm_provision_locks');
}
};