2025_04_30_180856_create_reclamation_document_table.php 703 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. */
  10. public function up(): void
  11. {
  12. Schema::create('reclamation_document', function (Blueprint $table) {
  13. $table->id();
  14. $table->foreignId('reclamation_id')->constrained('reclamations')->cascadeOnDelete();
  15. $table->foreignId('file_id')->constrained('files')->cascadeOnDelete();
  16. });
  17. }
  18. /**
  19. * Reverse the migrations.
  20. */
  21. public function down(): void
  22. {
  23. Schema::dropIfExists('reclamation_document');
  24. }
  25. };