Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | Schema::create('tag__tags', function (Blueprint $table) { |
||
16 | $table->engine = 'InnoDB'; |
||
17 | $table->increments('id'); |
||
18 | $table->string('namespace'); |
||
19 | $table->timestamps(); |
||
20 | }); |
||
21 | |||
22 | Schema::create('tag__tagged', function (Blueprint $table) { |
||
23 | $table->increments('id'); |
||
24 | $table->string('taggable_type'); |
||
25 | $table->integer('taggable_id')->unsigned(); |
||
26 | $table->integer('tag_id')->unsigned(); |
||
27 | $table->index(['taggable_type', 'taggable_id']); |
||
28 | }); |
||
29 | } |
||
30 | |||
41 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.