This commit is contained in:
Andras Bacsai
2023-03-27 14:31:42 +02:00
parent 1c87146a50
commit 653efb6983
21 changed files with 180 additions and 29 deletions

View File

@@ -20,6 +20,7 @@ return new class extends Migration
$table->integer('port')->default(22);
$table->string('user')->default('root');
$table->foreignId('team_id');
$table->foreignId('private_key_id');
$table->timestamps();
});
}

View File

@@ -17,7 +17,6 @@ return new class extends Migration
$table->string('name');
$table->string('description')->nullable();
$table->longText('private_key');
$table->nullableMorphs('private_keys_morph');
$table->timestamps();
});
}

View File

@@ -15,6 +15,7 @@ return new class extends Migration
$table->id();
$table->string('uuid')->unique();
$table->string('name');
$table->nullableMorphs('destination');
$table->timestamps();
});
}

View File

@@ -11,11 +11,12 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('private_keyables', function (Blueprint $table) {
Schema::create('standalone_dockers', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('private_key_id');
$table->unsignedBigInteger('private_keyable_id');
$table->string('private_keyable_type');
$table->string('uuid')->unique();
$table->string('network');
$table->foreignId('server_id');
$table->timestamps();
});
}
@@ -25,6 +26,6 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfExists('private_keyables');
Schema::dropIfExists('standalone_dockers');
}
};

View File

@@ -0,0 +1,31 @@
<?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::create('swarm_dockers', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->string('network');
$table->foreignId('server_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('swarm_dockers');
}
};