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

34 lines
654 B
PHP
Raw Permalink Normal View History

2024-03-28 09:51:45 +03:00
<?php
use common\components\Migration\MigrationWithDefaultOptions;
class m220621_145453_add_code_settings extends MigrationWithDefaultOptions
{
public function safeUp()
{
$this->insert('{{%code_settings}}', [
'name' => 'foreign_passport_guid',
'description' => 'Код паспорта иностранного гражданина',
'value' => '',
]);
Yii::$app->db->schema->refresh();
}
public function safeDown()
{
$this->delete('{{%code_settings}}', ['name' => ['foreign_passport_guid']]);
Yii::$app->db->schema->refresh();
}
}