portal.mkgtu.ru/common/migrations/db/m150917_083827_addbirthday.php

21 lines
452 B
PHP
Raw Normal View History

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