OSDN Git Service

Изменение обработки всех списков для отображения страниц с редактируемыми записями.
[invent/invent.git] / migrations / m201102_055906_modify_status_table.php
1 <?php
2
3 use yii\db\Migration;
4 use app\models\Status;
5
6 /**
7  * Class m201102_055906_modify_status_table
8  */
9 class m201102_055906_modify_status_table extends Migration
10 {
11     /**
12      * {@inheritdoc}
13      */
14     public function safeUp()
15     {
16         $this->alterColumn(Status::tableName(), 'name', $this->string(100)->notNull()->unique()->comment('Состояние'));
17     }
18
19     /**
20      * {@inheritdoc}
21      */
22     public function safeDown()
23     {
24         echo "m201102_055906_modify_status_table revert don't need.\n";
25
26         return true;
27     }
28
29     /*
30     // Use up()/down() to run migration code without a transaction.
31     public function up()
32     {
33
34     }
35
36     public function down()
37     {
38         echo "m201102_055906_modify_status_table cannot be reverted.\n";
39
40         return false;
41     }
42     */
43 }