@@ -0,0 +1,28 @@
|
||||
<?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');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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('private_audit_exports', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('tenant_id')->constrained()->restrictOnDelete();
|
||||
$table->foreignId('created_by')->constrained('users')->restrictOnDelete();
|
||||
$table->uuid('operation_key');
|
||||
$table->string('input_hash', 64);
|
||||
$table->string('work_context', 80);
|
||||
$table->json('families');
|
||||
$table->string('path');
|
||||
$table->unsignedBigInteger('size');
|
||||
$table->string('sha256', 64);
|
||||
$table->string('manifest_sha256', 64);
|
||||
$table->json('manifest');
|
||||
$table->timestamp('created_at');
|
||||
$table->unique(['tenant_id', 'created_by', 'operation_key'], 'private_audit_operation_unique');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('private_audit_exports');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user