Files
hqland-app/database/migrations/2025_01_06_000000_create_appendices_table.php

19 lines
829 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('appendices', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('contract_id')->constrained('contracts')->cascadeOnDelete();
$table->foreignUuid('product_id')->constrained('products')->cascadeOnDelete();
$table->string('type');
$table->integer('apply_from_order')->default(0);
$table->date('signing_date')->nullable();
$table->jsonb('custom_data')->nullable();
$table->timestamps();
});
}
public function down(): void { Schema::dropIfExists('appendices'); }
};