Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function up() |
||
12 | { |
||
13 | $tableOptions = null; |
||
14 | if ($this->db->driverName === 'mysql') { |
||
15 | // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci |
||
16 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; |
||
17 | } |
||
18 | |||
19 | $this->createTable($this->tableName, [ |
||
20 | 'id' => $this->primaryKey(), |
||
21 | 'job_id' => $this->integer()->notNull(), |
||
22 | 'progress_max' => $this->integer()->notNull(), |
||
23 | 'progress_now' => $this->integer()->notNull(), |
||
24 | ], $tableOptions); |
||
25 | |||
26 | $this->createIndex('job_id', $this->tableName, 'job_id'); |
||
27 | } |
||
34 |