Commit 06d7e2cdf518ae0b8222e3c417a46ea96a8fcc79
1 parent
fba72863
object kb lang object_name
Showing
2 changed files
with
55 additions
and
2 deletions
Show diff stats
common/models/ObjectkbLang.php
... | ... | @@ -69,14 +69,26 @@ |
69 | 69 | ], |
70 | 70 | [ |
71 | 71 | [ |
72 | - 'aliasValue', | |
73 | 72 | 'upper_text', |
74 | 73 | 'about_object_text', |
75 | - 'object_name', | |
76 | 74 | ], |
77 | 75 | 'string', |
78 | 76 | ], |
79 | 77 | [ |
78 | + [ | |
79 | + "object_name" | |
80 | + ], | |
81 | + 'string', | |
82 | + 'max' => 150 | |
83 | + ], | |
84 | + [ | |
85 | + [ | |
86 | + "aliasValue" | |
87 | + ], | |
88 | + 'string', | |
89 | + 'max' => 255 | |
90 | + ], | |
91 | + [ | |
80 | 92 | [ 'object_id' ], |
81 | 93 | 'exist', |
82 | 94 | 'skipOnError' => true, | ... | ... |
console/migrations/m180130_095130_change_string_length_in_object_lang_table.php
0 → 100644
1 | +<?php | |
2 | + | |
3 | +use yii\db\Migration; | |
4 | + | |
5 | +class m180130_095130_change_string_length_in_object_lang_table extends Migration | |
6 | +{ | |
7 | + public function safeUp() | |
8 | + { | |
9 | + | |
10 | + $this->alterColumn( | |
11 | + "object_lang", | |
12 | + "object_name", | |
13 | + $this->string(150) | |
14 | + ); | |
15 | + | |
16 | + } | |
17 | + | |
18 | + public function safeDown() | |
19 | + { | |
20 | + $this->alterColumn( | |
21 | + "object_lang", | |
22 | + "object_name", | |
23 | + $this->string(50) | |
24 | + );; | |
25 | + } | |
26 | + | |
27 | + /* | |
28 | + // Use up()/down() to run migration code without a transaction. | |
29 | + public function up() | |
30 | + { | |
31 | + | |
32 | + } | |
33 | + | |
34 | + public function down() | |
35 | + { | |
36 | + echo "m180130_095130_change_string_length_in_object_lang_table cannot be reverted.\n"; | |
37 | + | |
38 | + return false; | |
39 | + } | |
40 | + */ | |
41 | +} | ... | ... |