feat: implement server tag management with individual fields and update routes
This commit is contained in:
@@ -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']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user