mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 01:41:36 +00:00
31 lines
864 B
PHP
31 lines
864 B
PHP
<?php
|
|
|
|
use App\Enums\ServiceStatus;
|
|
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('services', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->unsignedBigInteger('server_id');
|
|
$table->string('type');
|
|
$table->json('type_data')->nullable();
|
|
$table->string('name');
|
|
$table->string('version');
|
|
$table->string('status')->default(ServiceStatus::INSTALLING);
|
|
$table->boolean('is_default')->default(1);
|
|
$table->string('unit')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('services');
|
|
}
|
|
};
|