m180301_103841_add_change_status_workflow_log_comment.php 836 Bytes
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
3
4
5
6
7
<?php

/**
 * Art-ER Attrattività, ricerca e territorio dell’Emilia-Romagna
 * OPEN 2.0
 *
 *
waltermazza's avatar
waltermazza committed
8
 * @package    arter\amos\workflow\migrations
Marcello Pivanti's avatar
Marcello Pivanti committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 * @category   CategoryName
 * @author     Elite Division S.r.l.
 */

use yii\db\Migration;

/**
 * Class m180301_103841_add_change_status_workflow_log_comment
 */
class m180301_103841_add_change_status_workflow_log_comment extends Migration
{

    const TABLE = '{{%amos_workflow_transitions_log}}';

    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        $this->addColumn(self::TABLE, 'comment', $this->text()->defaultValue(null)->after('end_status')->comment('Change status comment'));
        return true;
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        $this->dropColumn(self::TABLE, 'comment');
        return true;
    }

}