29 lines
988 B
PHP
29 lines
988 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('conflict_releases', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('tenant_id')->constrained()->restrictOnDelete();
|
|
$table->foreignId('root_id')->unique()->constrained('conflict_declarations')->restrictOnDelete();
|
|
$table->foreignId('declaration_id')->constrained('conflict_declarations')->restrictOnDelete();
|
|
$table->foreignId('authorised_by')->constrained('users')->restrictOnDelete();
|
|
$table->uuid('operation_key')->unique();
|
|
$table->text('reason');
|
|
$table->json('snapshot');
|
|
$table->timestamp('authorised_at');
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('conflict_releases');
|
|
}
|
|
};
|