Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | 63 | public function enigma(): void |
|
13 | { |
||
14 | 63 | $indexTable = $this->getTable().'_index'; |
|
15 | |||
16 | 63 | if (! Schema::hasTable($indexTable)) { |
|
17 | Schema::create($indexTable, static function ($table) { |
||
18 | 4 | $table->bigIncrements('id'); |
|
19 | 4 | $table->unsignedBigInteger('model_id')->nullable(); |
|
20 | 4 | $table->string('name', 64); |
|
21 | 4 | $table->string('hash', 604); |
|
22 | |||
23 | 4 | $table->index(['name', 'hash', 'model_id']); |
|
24 | 4 | $table->index(['model_id', 'name']); |
|
25 | 4 | }); |
|
29 |