update develop
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('module_snapshot', function (Blueprint $table) {
|
||||
$table->text('description')->nullable()->after('name');
|
||||
|
||||
// Async snapshot status
|
||||
$table->enum('status', [
|
||||
'pending',
|
||||
'processing',
|
||||
'success',
|
||||
'failed'
|
||||
])->default('pending')->index()->after('module_vmware_id');
|
||||
|
||||
// vCenter mapping
|
||||
$table->string('snapshot_ref')->nullable()->comment('Snapshot ID / moRef from vCenter');
|
||||
$table->string('vcenter_task_id')->nullable()->comment('Task ID from vCenter');
|
||||
|
||||
// Error handling
|
||||
$table->text('error_message')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('module_snapshot', function (Blueprint $table) {
|
||||
$table->dropColumn([
|
||||
'description',
|
||||
'status',
|
||||
'snapshot_ref',
|
||||
'vcenter_task_id',
|
||||
'error_message',
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('module_snapshot', function (Blueprint $table) {
|
||||
//
|
||||
$table->unsignedBigInteger('size_bytes')
|
||||
->nullable()
|
||||
->comment('Snapshot size in bytes');
|
||||
|
||||
$table->decimal('size_gb', 10, 2)
|
||||
->nullable()
|
||||
->comment('Snapshot size in GB');
|
||||
|
||||
$table->timestamp('size_last_synced_at')
|
||||
->nullable()
|
||||
->comment('Last time snapshot size was synced');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('module_snapshot', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user