Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
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->string('meta_group')->nullable(); |
||
35 | $table->morphs('metable'); |
||
36 | |||
37 | $table->index('meta_key'); |
||
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_attributes (meta_key, meta_value(20))' |
||
42 | ); |
||
43 | }); |
||
44 | } |
||
45 | |||
56 |