Refactor to remove slices and environments, replace with instances.

This commit is contained in:
2025-09-15 12:19:13 +01:00
parent a91780d1d5
commit 65d3142d03
24 changed files with 454 additions and 290 deletions

View File

@@ -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');
}
};

View File

@@ -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');
}
};
};