HEX
Server: LiteSpeed
System: Linux premium260.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: aliazzsr (627)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/aliazzsr/api.crm.vqode.com/migrations/m180421_233404_268CompanyProjectRelType.php
<?php

use app\models\core\CompanyProject;
use app\models\enums\CompanyProjectRelType as RelType;
use yii\db\Migration;

/**
 * Class m180421_233404_268CompanyProjectRelType
 */
class m180421_233404_268CompanyProjectRelType extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn(
            CompanyProject::tableName(),
            'reltype_id',
            $this->integer()->notNull()->defaultValue(RelType::RELATED)->comment('Relation type of company in the project')
        );
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn(CompanyProject::tableName(), 'reltype_id');
    }
}