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

44 lines
873 B
PHP
Raw Permalink Normal View History

2024-03-28 09:51:45 +03:00
<?php
use common\components\Migration\MigrationWithDefaultOptions;
class m221123_133946_add_integration_settings extends MigrationWithDefaultOptions
{
public function safeUp()
{
$this->createTable('{{%integration_settings}}', [
'id' => $this->primaryKey(),
'name' => $this->string(255)->notNull(),
'value' => $this->string(),
]);
$this->insert(
'{{%integration_settings}}',
[
'name' => 'sms_sender',
'value' => '',
]
);
$this->insert(
'{{%integration_settings}}',
[
'name' => 'telegram_bot_sender',
'value' => '',
]
);
}
public function safeDown()
{
$this->dropTable('{{%integration_settings}}');
}
}