portal.mkgtu.ru/common/migrations/db/m160620_131837_add_notfound...

19 lines
479 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?php
use common\components\Migration\MigrationWithDefaultOptions;
class m160620_131837_add_notfound_check extends MigrationWithDefaultOptions
{
public function safeUp()
{
$this->addColumn('{{%address_data}}', 'not_found', $this->smallInteger()->defaultValue(0));
Yii::$app->db->schema->refresh();
}
public function safeDown()
{
$this->dropColumn('{{%address_data}}', 'not_found');
Yii::$app->db->schema->refresh();
}
}