coolify/database/migrations/2023_03_27_083621_create_services_table.php

34 lines
709 B
PHP
Raw Normal View History

<?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
{
2023-03-28 08:28:03 +02:00
Schema::create('services', function (Blueprint $table) {
$table->id();
2023-03-27 14:31:42 +02:00
$table->string('uuid')->unique();
2023-03-28 08:28:03 +02:00
$table->string('name');
2023-03-27 14:31:42 +02:00
2023-09-24 11:56:32 +02:00
$table->morphs('destination');
2023-03-28 08:28:03 +02:00
$table->foreignId('environment_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
2023-03-28 08:28:03 +02:00
Schema::dropIfExists('services');
}
};