From 32e96dc0a695754989eb6e317daea079dd9456a2 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Thu, 6 Jun 2024 15:49:36 -0400 Subject: [PATCH] Wip --- .../2024_06_06_043350_modify_allocations.php | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 database/migrations/2024_06_06_043350_modify_allocations.php diff --git a/database/migrations/2024_06_06_043350_modify_allocations.php b/database/migrations/2024_06_06_043350_modify_allocations.php new file mode 100644 index 000000000..4577b1305 --- /dev/null +++ b/database/migrations/2024_06_06_043350_modify_allocations.php @@ -0,0 +1,43 @@ +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']); + }); + } +};