| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 10 | ||
| Bugs | 5 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('translations', function (Blueprint $table) { |
||
| 17 | $table->string('key'); |
||
| 18 | $table->text('value'); |
||
| 19 | $table->bigInteger('translatable_id')->unsigned(); |
||
| 20 | $table->string('translatable_type'); |
||
| 21 | $table->string('locale'); |
||
| 22 | }); |
||
| 23 | |||
| 24 | // sqlite does not like this... |
||
| 25 | if (app()->environment() !== 'testing') { |
||
|
|
|||
| 26 | \DB::statement('ALTER TABLE `translations` ADD FULLTEXT fulltext_index (`value`)'); |
||
| 27 | \DB::statement('ALTER TABLE `translations` ADD INDEX `type_local_key_id`(`key`, `translatable_id`, `translatable_type`, `locale`);'); |
||
| 28 | } |
||
| 41 |