| Conditions | 2 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function safeUp() |
||
| 20 | { |
||
| 21 | $this->createTable( |
||
| 22 | '{{%profile}}', |
||
| 23 | [ |
||
| 24 | 'user_id' => $this->primaryKey(), |
||
| 25 | 'name' => $this->string(255), |
||
| 26 | 'public_email' => $this->string(255), |
||
| 27 | 'gravatar_email' => $this->string(255), |
||
| 28 | 'gravatar_id' => $this->string(32), |
||
| 29 | 'location' => $this->string(255), |
||
| 30 | 'website' => $this->string(255), |
||
| 31 | 'timezone' => $this->string(40), |
||
| 32 | 'bio' => $this->text(), |
||
| 33 | ], |
||
| 34 | MigrationHelper::resolveTableOptions($this->db->driverName) |
||
| 35 | ); |
||
| 36 | |||
| 37 | $restrict = MigrationHelper::isMicrosoftSQLServer($this->db->driverName) ? 'NO ACTION' : 'RESTRICT'; |
||
| 38 | |||
| 39 | $this->addForeignKey('fk_profile_user', '{{%profile}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict); |
||
| 40 | } |
||
| 41 | |||
| 47 |