관리-도구
편집 파일: 2025_02_09_121637_create_payment_documents_table.php
<?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 { Schema::create('payment_documents', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('purchase_id'); $table->string('document'); $table->timestamps(); $table->foreign('purchase_id')->references('id')->on('purchases')->onDelete('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('payment_documents'); } };