|
6 | 6 |
|
7 | 7 | return new class extends Migration |
8 | 8 | { |
9 | | - public function up() |
| 9 | + public function up(): void |
10 | 10 | { |
11 | 11 | Schema::create('aissue_issues', function (Blueprint $table) { |
12 | 12 | $table->bigIncrements('id'); |
13 | | - $table->string('code')->nullable(); |
14 | 13 | $table->string('model_type'); |
15 | | - $table->bigIncrements('model_id'); |
16 | | - $table->bigIncrements('assignee_id'); |
17 | | - $table->bigIncrements('creater_id'); |
18 | | - $table->bigIncrements('issue_type_id'); |
| 14 | + $table->bigInteger('model_id'); |
| 15 | + $table->bigInteger('assignee_id'); |
| 16 | + $table->bigInteger('creater_id'); |
| 17 | + $table->string('issue_type'); |
19 | 18 | $table->string('summary'); |
20 | | - $table->string('description'); |
21 | | - $table->bigIncrements('priority'); |
| 19 | + $table->string('description')->nullable(); |
| 20 | + $table->bigInteger('priority')->default(1); |
22 | 21 | $table->string('status'); |
23 | | - $table->dateTime('duedate'); |
24 | | - $table->boolean('archived'); |
25 | | - $table->bigIncrements('archived_by'); |
26 | | - $table->dateTime('archived_at'); |
| 22 | + $table->dateTime('duedate')->nullable(); |
| 23 | + $table->boolean('archived')->default(false); |
| 24 | + $table->bigInteger('archived_by')->nullable(); |
| 25 | + $table->dateTime('archived_at')->nullable(); |
27 | 26 | $table->timestamps(); |
28 | 27 | }); |
29 | | - |
30 | | - Schema::create('aissue_issue_types', function (Blueprint $table) { |
31 | | - $table->bigIncrements('id'); |
32 | | - $table->string('workflow'); |
33 | | - $table->string('name'); |
34 | | - $table->string('description'); |
35 | | - $table->timestamps(); |
36 | | - }); |
37 | | - |
38 | 28 | } |
39 | 29 |
|
40 | | - public function down(){ |
| 30 | + public function down(): void |
| 31 | + { |
41 | 32 | Schema::dropIfExists('aissue_issues'); |
42 | | - Schema::dropIfExists('aissue_issue_types'); |
43 | 33 | } |
44 | | - |
45 | 34 | }; |
0 commit comments