This commit is contained in:
Andras Bacsai
2023-05-30 15:52:17 +02:00
parent 6e72889294
commit 0f50d1accd
36 changed files with 715 additions and 273 deletions

View File

@@ -41,8 +41,6 @@ return new class extends Migration
$table->string('base_directory')->default('/');
$table->string('publish_directory')->nullable();
$table->schemalessAttributes('extra_attributes');
$table->string('health_check_path')->default('/');
$table->string('health_check_port')->nullable();
$table->string('health_check_host')->default('localhost');
@@ -65,6 +63,7 @@ return new class extends Migration
$table->integer('limits_cpu_shares')->default(1024);
$table->string('status')->default('exited');
$table->string('preview_url_template')->default('{{pr_id}}.{{domain}}');
$table->nullableMorphs('destination');
$table->nullableMorphs('source');

View File

@@ -0,0 +1,34 @@
<?php
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('application_previews', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->integer('pull_request_id');
$table->string('fqdn')->unique()->nullable();
$table->string('status')->default('exited');
$table->foreignId('application_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('application_previews');
}
};

View File

@@ -14,8 +14,10 @@ return new class extends Migration
Schema::create('application_deployment_queues', function (Blueprint $table) {
$table->id();
$table->string('application_id');
$table->string('deployment_uuid')->unique();
$table->integer('pull_request_id')->default(0);
$table->schemalessAttributes('extra_attributes');
$table->boolean('force_rebuild')->default(false);
$table->string('commit')->default('HEAD');
$table->string('status')->default('queued');
$table->timestamps();
});