Files
keystone/database/migrations/2025_03_31_140110_create_deployments_table.php
2025-05-22 17:19:28 +01:00

27 lines
709 B
PHP

<?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->string('hash')->unique();
$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');
}
};