feat: implement server tag management with individual fields and update routes

This commit is contained in:
2025-12-18 21:09:45 -05:00
parent db04b8a6c3
commit b0f7c7f20d
6 changed files with 167 additions and 217 deletions

View File

@@ -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
{
public function up(): void
{
Schema::table('ext_proxmox_servers', function (Blueprint $table) {
if (!Schema::hasColumn('ext_proxmox_servers', 'tag1')) {
$table->longText('tag1')->nullable();
}
if (!Schema::hasColumn('ext_proxmox_servers', 'tag1color')) {
$table->longText('tag1color')->nullable();
}
if (!Schema::hasColumn('ext_proxmox_servers', 'tag2')) {
$table->longText('tag2')->nullable();
}
if (!Schema::hasColumn('ext_proxmox_servers', 'tag2color')) {
$table->longText('tag2color')->nullable();
}
if (!Schema::hasColumn('ext_proxmox_servers', 'tag3')) {
$table->longText('tag3')->nullable();
}
if (!Schema::hasColumn('ext_proxmox_servers', 'tag3color')) {
$table->longText('tag3color')->nullable();
}
});
}
public function down(): void
{
Schema::table('ext_proxmox_servers', function (Blueprint $table) {
$table->dropColumn(['tag1', 'tag1color', 'tag2', 'tag2color', 'tag3', 'tag3color']);
});
}
};