lasthourcloud/database/migrations/2023_03_27_083621_create_services_table.php

33 lines
721 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-21 15:48:31 +00:00
$table->foreignId('server_id')->nullable();
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');
}
};