build logs
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
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('docker_image_builds', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor(User::class)->constrained()->cascadeOnDelete();
|
||||
$table->string('image_name');
|
||||
$table->string('image_tag', 128);
|
||||
$table->longText('dockerfile_content');
|
||||
$table->json('environment')->nullable();
|
||||
$table->string('status', 20)->index();
|
||||
$table->longText('build_output')->nullable();
|
||||
$table->boolean('successful')->nullable();
|
||||
$table->integer('exit_code')->nullable();
|
||||
$table->timestamp('queued_at')->nullable()->index();
|
||||
$table->timestamp('started_at')->nullable();
|
||||
$table->timestamp('finished_at')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['user_id', 'id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('docker_image_builds');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user