deployments wip
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('deployments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->morphs('target'); // server, service, etc.
|
||||
$table->string('status');
|
||||
$table->dateTime('started_at')->nullable();
|
||||
$table->dateTime('finished_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('deployments');
|
||||
}
|
||||
};
|
||||
25
database/migrations/2025_03_31_141005_create_steps_table.php
Normal file
25
database/migrations/2025_03_31_141005_create_steps_table.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Deployment;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('steps', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor(Deployment::class);
|
||||
$table->longText('script');
|
||||
$table->longText('logs')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('steps');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user