Refactor to remove slices and environments, replace with instances.
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Environment;
|
||||
use App\Models\Service;
|
||||
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('slices', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor(Service::class);
|
||||
$table->foreignIdFor(Environment::class);
|
||||
$table->json('data')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('slices');
|
||||
}
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Application;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
@@ -9,19 +10,19 @@ return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('environments', function (Blueprint $table) {
|
||||
Schema::create('instances', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor(Application::class);
|
||||
$table->string('name');
|
||||
$table->foreignIdFor(Server::class);
|
||||
$table->string('branch');
|
||||
$table->string('url');
|
||||
$table->string('status');
|
||||
$table->json('config')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('environments');
|
||||
Schema::dropIfExists('instances');
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user