| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('related', function (Blueprint $table) { |
||
| 17 | $table->integer('subject_id')->nullable()->unsigned(); |
||
| 18 | $table->string('subject_type', 255); |
||
| 19 | $table->integer('related_id')->nullable()->unsigned(); |
||
| 20 | $table->string('related_type', 255); |
||
| 21 | $table->string('browser_name')->index(); |
||
| 22 | $table->integer('position')->unsigned(); |
||
| 23 | |||
| 24 | $table->unique( |
||
| 25 | ['subject_id', 'subject_type', 'related_id', 'related_type', 'browser_name'], |
||
| 26 | 'related_unique' |
||
| 27 | ); |
||
| 41 |