| Conditions | 1 |
| Paths | 1 |
| Total Lines | 44 |
| Code Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | public function initInverter(\execut\yii\migration\Inverter $i) |
||
| 7 | { |
||
| 8 | $i->createTable('import_files_encodings', array_merge($this->defaultColumns(), [ |
||
| 9 | 'name' => $this->string()->notNull(), |
||
| 10 | 'key' => $this->string()->notNull(), |
||
| 11 | ])); |
||
| 12 | $i->batchInsert('import_files_encodings', [ |
||
| 13 | 'id', |
||
| 14 | 'key', |
||
| 15 | 'name', |
||
| 16 | ], [ |
||
| 17 | [ |
||
| 18 | 'id' => 1, |
||
| 19 | 'key' => 'UTF-8', |
||
| 20 | 'name' => 'UTF-8' |
||
| 21 | ], |
||
| 22 | [ |
||
| 23 | 'id' => 2, |
||
| 24 | 'key' => 'UTF-16', |
||
| 25 | 'name' => 'UTF-16' |
||
| 26 | ], |
||
| 27 | [ |
||
| 28 | 'id' => 3, |
||
| 29 | 'key' => 'KOI8-R', |
||
| 30 | 'name' => 'KOI8-R' |
||
| 31 | ], |
||
| 32 | [ |
||
| 33 | 'id' => 4, |
||
| 34 | 'key' => 'KOI8-U', |
||
| 35 | 'name' => 'KOI8-U' |
||
| 36 | ], |
||
| 37 | [ |
||
| 38 | 'id' => 5, |
||
| 39 | 'key' => 'Windows-1251', |
||
| 40 | 'name' => 'Windows-1251' |
||
| 41 | ], |
||
| 42 | [ |
||
| 43 | 'id' => 6, |
||
| 44 | 'key' => 'Windows-1252', |
||
| 45 | 'name' => 'Windows-1252' |
||
| 46 | ], |
||
| 47 | ]); |
||
| 48 | $i->table('import_settings') |
||
| 49 | ->addForeignColumn('import_files_encodings', true, 1); |
||
| 50 | } |
||
| 52 |