2024_01_20_083910_create_requirement_table.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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('requirements', function (Blueprint $table) {
  13. $table->id();
  14. $table->string('title');
  15. $table->enum('status', ['changed', 'active', 'draft', 'closed'])->default('draft');
  16. $table->integer('asset_id');
  17. $table->integer('company_id');
  18. $table->integer('requirement_group_id');
  19. $table->integer('reviewed_by')->nullable();
  20. $table->tinyInteger('priority')->default(1);
  21. $table->string('note')->nullable();
  22. $table->text('description')->nullable();
  23. $table->text('acceptance')->nullable();
  24. $table->json('mailto');
  25. $table->integer('created_by');
  26. $table->softDeletes();
  27. $table->timestamps();
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. */
  33. public function down(): void
  34. {
  35. Schema::dropIfExists('requirements');
  36. }
  37. };