You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.7 KiB

  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateTasksTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('tasks', function (Blueprint $table) {
  15. $table->id();
  16. $table->unsignedBigInteger('business_id');
  17. $table->unsignedBigInteger('project_id');
  18. $table->unsignedBigInteger('creator_id');
  19. $table->unsignedBigInteger('assignee_id')->nullable();
  20. $table->unsignedBigInteger('system_id')->nullable();
  21. $table->unsignedBigInteger('sprint_id')->nullable();
  22. $table->unsignedBigInteger('workflow_id');
  23. $table->unsignedBigInteger('status_id');
  24. $table->unsignedBigInteger('approver_id')->nullable();
  25. $table->string('title');
  26. $table->text('description')->nullable();
  27. $table->integer('priority')->default(1);
  28. $table->boolean('on_time')->default(true);
  29. $table->boolean('ready_to_test')->default(false);
  30. $table->json('watchers')->nullable();
  31. $table->integer('spent_time')->default(0);
  32. $table->integer('estimated_time')->default(0);
  33. $table->date('due_date')->nullable();
  34. $table->date('completed_at')->nullable();
  35. $table->timestamp('work_start')->nullable();
  36. $table->timestamp('work_finish')->nullable();
  37. $table->timestamps();
  38. });
  39. }
  40. /**
  41. * Reverse the migrations.
  42. *
  43. * @return void
  44. */
  45. public function down()
  46. {
  47. Schema::dropIfExists('tasks');
  48. }
  49. }