vito/database/migrations/2021_07_02_065815_create_deployments_table.php
Saeed Vaziry 5c72f12490 init
2023-07-02 12:47:50 +02:00

29 lines
828 B
PHP
Executable File

<?php
use App\Enums\DeploymentStatus;
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->unsignedBigInteger('site_id');
$table->unsignedBigInteger('deployment_script_id');
$table->unsignedInteger('log_id')->nullable();
$table->json('commit_data')->nullable();
$table->string('commit_id')->nullable();
$table->enum('status', DeploymentStatus::getValues());
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('deployments');
}
};