feat: Netzwerk-Segmentverwaltung, Dashboard, globale Suche v0.6.0
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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('network_segments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name'); // z.B. "Büro", "Server-VLAN"
|
||||
$table->string('subnet'); // z.B. "192.168.86.0/24"
|
||||
$table->unsignedSmallInteger('vlan_id')->nullable(); // z.B. 10, 20
|
||||
$table->boolean('active')->default(true); // aktiv überwachen
|
||||
$table->text('description')->nullable(); // optionale Beschreibung
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('network_segments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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('network_scans', function (Blueprint $table) {
|
||||
$table->foreignId('segment_id')
|
||||
->nullable()
|
||||
->after('id')
|
||||
->constrained('network_segments')
|
||||
->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('network_scans', function (Blueprint $table) {
|
||||
$table->dropForeign(['segment_id']);
|
||||
$table->dropColumn('segment_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user