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

21 lines
499 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?php
use common\components\Migration\MigrationWithDefaultOptions;
class m160606_112253_add_application_code extends MigrationWithDefaultOptions
{
public function safeUp()
{
$this->addColumn('{{%dormitory_register}}', 'register_code', $this->string(100));
Yii::$app->db->schema->refresh();
}
public function safeDown()
{
$this->dropColumn('{{%dormitory_register}}', 'register_code');
Yii::$app->db->schema->refresh();
}
}