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;
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-09-24 09:56:32 +00:00
$table->morphs('destination');
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');
}
};