| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | $tableOptions = null; |
||
| 17 | if ($this->db->driverName === 'mysql') { |
||
| 18 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; |
||
| 19 | } |
||
| 20 | |||
| 21 | $this->createTable('device', [ |
||
| 22 | 'id' => $this->primaryKey()->notNull()->append('AUTO_INCREMENT'), |
||
| 23 | 'name' => $this->string(64)->notNull(), |
||
| 24 | 'description' => $this->string(1024), |
||
| 25 | 'last_auth' => $this->timestamp()->null(), |
||
| 26 | 'enabled' => $this->boolean()->notNull()->defaultValue(false), |
||
| 27 | ], $tableOptions); |
||
| 28 | } |
||
| 29 | |||
| 38 |