coolify/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php

34 lines
773 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 20:48:52 +02:00
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
2023-03-27 14:31:42 +02:00
Schema::create('standalone_dockers', function (Blueprint $table) {
$table->id();
2023-05-02 12:47:52 +02:00
$table->string('name');
2023-03-27 14:31:42 +02:00
$table->string('uuid')->unique();
2023-03-30 09:47:04 +02:00
$table->string('network');
2023-03-27 14:31:42 +02:00
$table->foreignId('server_id');
2023-05-02 12:47:52 +02:00
$table->unique(['server_id', 'network']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
2023-03-27 14:31:42 +02:00
Schema::dropIfExists('standalone_dockers');
}
};