| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function up() |
||
| 28 | { |
||
| 29 | \Schema::create($this->table, function (Blueprint $table) { |
||
| 30 | $table->increments('meta_id'); |
||
| 31 | $table->string('meta_key'); |
||
| 32 | $table->longText('meta_value'); |
||
| 33 | $table->string('meta_type')->default('string'); |
||
| 34 | $table->morphs('metable'); |
||
| 35 | |||
| 36 | $table->index('meta_key'); |
||
| 37 | }); |
||
| 38 | |||
| 39 | // Laravel doesn't handle index length, so we need raw statement for this one |
||
| 40 | \Schema::getConnection()->statement( |
||
| 41 | 'create index meta_attributes_index_value on (meta_key, meta_value(20))' |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | |||
| 55 |