Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function safeUp() |
||
28 | { |
||
29 | $tableOptions = null; |
||
30 | if ($this->db->driverName === 'mysql') { |
||
31 | /* @link http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci */ |
||
32 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; |
||
33 | } |
||
34 | |||
35 | $this->createTable( |
||
36 | $this->tableName, |
||
37 | [ |
||
38 | 'id' => $this->primaryKey()->comment('ID'), |
||
39 | 'contacts' => $this->string(255)->comment('Contacts'), |
||
40 | 'created_at' => $this->integer()->notNull()->comment('Created at'), |
||
41 | 'updated_at' => $this->integer()->notNull()->comment('Updated at'), |
||
42 | ], |
||
43 | $tableOptions |
||
44 | ); |
||
55 |