lasthourcloud/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;
2023-08-11 18:48:52 +00:00
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
2023-03-28 06:28:03 +00:00
Schema::create('services', function (Blueprint $table) {
$table->id();
2023-03-27 12:31:42 +00:00
$table->string('uuid')->unique();
2023-03-28 06:28:03 +00:00
$table->string('name');
2023-03-27 12:31:42 +00:00
2023-03-28 06:28:03 +00:00
$table->morphs('destination');
2023-04-03 11:37:53 +00:00
2023-03-28 06:28:03 +00:00
$table->foreignId('environment_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
2023-03-28 06:28:03 +00:00
Schema::dropIfExists('services');
}
};