Commit 8f939a274012c24e8a1f4cac0e6f3296aa4ae043
1 parent
d04fea85
add Vitaliy's widgets
Showing
4 changed files
with
26 additions
and
1 deletions
Show diff stats
common/models/User.php
@@ -63,6 +63,7 @@ class User extends ActiveRecord implements IdentityInterface, UserRbacInterface | @@ -63,6 +63,7 @@ class User extends ActiveRecord implements IdentityInterface, UserRbacInterface | ||
63 | ['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]], | 63 | ['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]], |
64 | [['username', 'lastname', 'firstname', 'middlename'], 'string', 'max' => 255], | 64 | [['username', 'lastname', 'firstname', 'middlename'], 'string', 'max' => 255], |
65 | [['type'], 'in', 'range' => [1, 2]], | 65 | [['type'], 'in', 'range' => [1, 2]], |
66 | + [['type'], 'default', 'value' => '1',], | ||
66 | ]; | 67 | ]; |
67 | } | 68 | } |
68 | 69 |
common/models/UserInfo.php
@@ -65,6 +65,7 @@ class UserInfo extends \yii\db\ActiveRecord | @@ -65,6 +65,7 @@ class UserInfo extends \yii\db\ActiveRecord | ||
65 | [['date_visit'], 'safe'], | 65 | [['date_visit'], 'safe'], |
66 | [['experience', 'soft', 'guarantee', 'about', 'city', 'country'], 'string'], | 66 | [['experience', 'soft', 'guarantee', 'about', 'city', 'country'], 'string'], |
67 | [['prepayment'], 'number'], | 67 | [['prepayment'], 'number'], |
68 | + | ||
68 | [['rank', 'location'], 'string', 'max' => 50], | 69 | [['rank', 'location'], 'string', 'max' => 50], |
69 | [['salary', 'job'], 'string', 'max' => 255], | 70 | [['salary', 'job'], 'string', 'max' => 255], |
70 | [['busy', 'member'], 'boolean'], | 71 | [['busy', 'member'], 'boolean'], |
@@ -95,6 +96,7 @@ class UserInfo extends \yii\db\ActiveRecord | @@ -95,6 +96,7 @@ class UserInfo extends \yii\db\ActiveRecord | ||
95 | 'delivery' => Yii::t('app', 'Delivery'), | 96 | 'delivery' => Yii::t('app', 'Delivery'), |
96 | 'prepayment' => Yii::t('app', 'Prepayment'), | 97 | 'prepayment' => Yii::t('app', 'Prepayment'), |
97 | 'about' => Yii::t('app', 'About'), | 98 | 'about' => Yii::t('app', 'About'), |
99 | + | ||
98 | ]; | 100 | ]; |
99 | } | 101 | } |
100 | } | 102 | } |
console/migrations/m160203_133308_add_field_specialization.php
@@ -11,6 +11,6 @@ class m160203_133308_add_field_specialization extends Migration | @@ -11,6 +11,6 @@ class m160203_133308_add_field_specialization extends Migration | ||
11 | 11 | ||
12 | public function down() | 12 | public function down() |
13 | { | 13 | { |
14 | - $this->dropColumn('option', 'image'); | 14 | + $this->dropColumn('specialization', 'image'); |
15 | } | 15 | } |
16 | } | 16 | } |
console/migrations/m160203_140144_add_field_user_info.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +use yii\db\Migration; | ||
4 | + | ||
5 | +class m160203_140144_add_field_user_info extends Migration | ||
6 | +{ | ||
7 | + public function up() | ||
8 | + { | ||
9 | + $this->addColumn('user_info', 'social_vk', $this->string(255)); | ||
10 | + $this->addColumn('user_info', 'social_fb', $this->string(255)); | ||
11 | + $this->addColumn('user_info', 'social_in', $this->string(255)); | ||
12 | + $this->addColumn('user_info', 'social_t', $this->string(255)); | ||
13 | + } | ||
14 | + | ||
15 | + public function down() | ||
16 | + { | ||
17 | + $this->dropColumn('user_info', 'social_vk'); | ||
18 | + $this->dropColumn('user_info', 'social_fb'); | ||
19 | + $this->dropColumn('user_info', 'social_in'); | ||
20 | + $this->dropColumn('user_info', 'social_t'); | ||
21 | + } | ||
22 | +} |