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

20 lines
506 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?php
use common\components\Migration\MigrationWithDefaultOptions;
class m160615_072640_fix_house_number extends MigrationWithDefaultOptions
{
public function safeUp()
{
$this->alterColumn('{{%address_data}}', 'house_number', $this->string("100"));
Yii::$app->db->schema->refresh();
}
public function safeDown()
{
$this->alterColumn('{{%address_data}}', 'house_number', $this->string("100")->notNull());
Yii::$app->db->schema->refresh();
}
}