| Conditions | 1 |
| Paths | 1 |
| Total Lines | 38 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function up() |
||
| 25 | { |
||
| 26 | $tablePrefix = $this->db->tablePrefix; |
||
| 27 | $userTableName = $tablePrefix . 'user'; |
||
| 28 | $profileTableName = $tablePrefix . 'profile'; |
||
| 29 | $sql = <<<EOT |
||
| 30 | CREATE |
||
| 31 | VIEW `UserProfileView`AS |
||
| 32 | SELECT |
||
| 33 | `t_user`.guid, |
||
| 34 | `t_user`.id, |
||
| 35 | `t_user`.pass_hash, |
||
| 36 | `t_user`.ip, |
||
| 37 | `t_user`.ip_type, |
||
| 38 | `t_user`.created_at, |
||
| 39 | `t_user`.updated_at, |
||
| 40 | `t_user`.auth_key, |
||
| 41 | `t_user`.access_token, |
||
| 42 | `t_user`.password_reset_token, |
||
| 43 | `t_user`.`status`, |
||
| 44 | `t_user`.type, |
||
| 45 | `t_user`.source, |
||
| 46 | `t_profile`.nickname, |
||
| 47 | `t_profile`.first_name, |
||
| 48 | `t_profile`.last_name, |
||
| 49 | `t_profile`.gravatar_type, |
||
| 50 | `t_profile`.gravatar, |
||
| 51 | `t_profile`.gender, |
||
| 52 | `t_profile`.timezone, |
||
| 53 | `t_profile`.individual_sign, |
||
| 54 | `t_profile`.created_at AS profile_created_at, |
||
| 55 | `t_profile`.updated_at AS profile_updated_at |
||
| 56 | FROM |
||
| 57 | `$userTableName` AS `t_user` |
||
| 58 | INNER JOIN `$profileTableName` AS `t_profile` ON `t_profile`.guid = `t_user`.guid ; |
||
| 59 | EOT; |
||
| 60 | $this->execute($sql); |
||
| 61 | } |
||
| 62 | |||
| 79 |