Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
37 | public function up() |
||
38 | { |
||
39 | $cache = $this->getCache(); |
||
40 | $this->db = $cache->db; |
||
41 | |||
42 | $tableOptions = null; |
||
43 | if ($this->db->driverName === 'mysql') { |
||
44 | // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci |
||
45 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; |
||
46 | } |
||
47 | |||
48 | $this->createTable($cache->cacheTable, [ |
||
49 | 'id' => $this->string(128)->notNull(), |
||
50 | 'expire' => $this->integer(), |
||
51 | 'data' => $this->binary(), |
||
52 | 'PRIMARY KEY ([[id]])', |
||
53 | ], $tableOptions); |
||
54 | } |
||
67 |