m210606_170159_add_host_status.php
471 Bytes
<?php
use yii\db\Migration;
/**
* Class m210606_170159_add_host_status
*/
class m210606_170159_add_host_status extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('{{%host}}', 'status', $this->tinyInteger(1)->notNull()->defaultValue(0)->comment('Статус'));
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('{{%host}}', 'status');
}
}