Files
keystone/database/migrations/2025_03_27_114736_create_applications_table.php

32 lines
982 B
PHP

<?php
use App\Models\Organisation;
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('applications', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Organisation::class);
$table->string('name');
$table->string('repository_url');
$table->string('repository_type');
$table->string('default_branch')->default('main');
$table->text('deploy_key_public')->nullable();
$table->text('deploy_key_private')->nullable();
$table->string('deploy_key_fingerprint')->nullable();
$table->timestamp('deploy_key_installed_at')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('applications');
}
};