| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 20 | 
| Code Lines | 14 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 12 | */ | ||
| 13 | public function up() | ||
| 14 | 	{ | ||
| 15 | $tableOptions = null; | ||
| 16 | |||
| 17 | 		if ($this->db->driverName === 'mysql') { | ||
| 18 | // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci | ||
| 19 | $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; | ||
| 20 | } | ||
| 21 | |||
| 22 | 		$this->createTable('{{%user}}', [ | ||
| 23 | 'id' =>$this->primaryKey(), | ||
| 24 | 'username' =>$this->string()->notNull()->unique(), | ||
| 25 | 'auth_key' =>$this->string(32)->notNull(), | ||
| 26 | 'password_hash' =>$this->string()->notNull(), | ||
| 27 | 'password_reset_token' =>$this->string()->unique(), | ||
| 28 | 'email' =>$this->string()->notNull()->unique(), | ||
| 29 | 'role' =>$this->smallInteger()->notNull()->defaultValue(10), | ||
| 30 | 'status' =>$this->smallInteger()->notNull()->defaultValue(10), | ||
| 31 | 'created_at' =>$this->integer()->notNull(), | ||
| 32 | 'updated_at' =>$this->integer()->notNull(), | ||
| 44 |