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

41 lines
1.0 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
use common\components\Migration\MigrationWithDefaultOptions;
use common\models\settings\TextSetting;
class m210922_100214_add_text_settings extends MigrationWithDefaultOptions
{
public function safeUp()
{
$this->insert(
TextSetting::tableName(),
[
'name' => 'questionary_status_reset_message',
'description' => 'Текст предупреждения о сбросе статуса при изменении данных анкеты',
'value' => 'При изменении данных анкеты все ваши заявления получат статус "Не подано"',
'order' => 0,
'category' => TextSetting::CATEGORY_QUESTIONARY
]
);
\Yii::$app->db->schema->refresh();
}
public function safeDown()
{
$this->delete(
TextSetting::tableName(),
['name' => 'questionary_status_reset_message']
);
}
}