2025_04_30_172039_create_reclamations_table.php 981 B

12345678910111213141516171819202122232425262728293031323334
  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('reclamations', function (Blueprint $table) {
  13. $table->id()->from(100);
  14. $table->foreignId('order_id')->constrained('orders')->restrictOnDelete();
  15. $table->foreignId('user_id')->constrained('users')->restrictOnDelete();
  16. $table->date('create_date')->useCurrent();
  17. $table->date('finish_date')->nullable();
  18. $table->text('reason')->nullable();
  19. $table->text('guarantee')->nullable();
  20. $table->text('whats_done')->nullable();
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. */
  27. public function down(): void
  28. {
  29. Schema::dropIfExists('reclamations');
  30. }
  31. };