mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-18 06:11:08 +02:00
Wip
This commit is contained in:
parent
b16a11c365
commit
32e96dc0a6
43
database/migrations/2024_06_06_043350_modify_allocations.php
Normal file
43
database/migrations/2024_06_06_043350_modify_allocations.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?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('servers', function (Blueprint $table) {
|
||||
$table->json('ports');
|
||||
});
|
||||
|
||||
Schema::dropIfExists('allocations');
|
||||
|
||||
Schema::table('servers', function (Blueprint $table) {
|
||||
$table->dropColumn(['allocation_id', 'allocation_limit']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::create('allocations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('node_id');
|
||||
$table->string('ip');
|
||||
$table->text('ip_alias');
|
||||
$table->unsignedMediumInteger('port');
|
||||
$table->unsignedInteger('server_id');
|
||||
$table->string('notes')->default('');
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['node_id', 'ip', 'port']);
|
||||
});
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user