| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | $this->createTableWithTimestamps(Language::tableName(), [ |
||
| 17 | 'id' => $this->primaryKey(), |
||
|
|
|||
| 18 | 'locale' => $this->string(8), |
||
| 19 | 'shortName' => $this->string(3), |
||
| 20 | 'name' => $this->string(64), |
||
| 21 | 'default' => $this->tinyInteger(2) |
||
| 22 | ->notNull() |
||
| 23 | ->defaultValue(0), |
||
| 24 | ]); |
||
| 25 | $now = (new \DateTime())->format('Y-m-d H:i:s'); |
||
| 26 | $this->db->createCommand() |
||
| 27 | ->insert(Language::tableName(), [ |
||
| 28 | 'locale' => 'en-EN', |
||
| 29 | 'shortName' => 'en', |
||
| 30 | 'name' => 'English', |
||
| 31 | 'default' => 1, |
||
| 32 | 'created_at' => $now, |
||
| 33 | 'updated_at' => $now, |
||
| 34 | ]) |
||
| 35 | ->execute(); |
||
| 36 | } |
||
| 46 |