- Добавлена миграция на добавление поля идентификатора шаблона в таблице расписания

parent 9ec19db0
<?php
use yii\db\Migration;
class m160228_222009_add_template_column_to_trigger_schedule_table extends Migration
{
public function up()
{
$this->addColumn(
'trigger_schedule',
'template_id',
$this->integer(11)->notNull()
);
$this->addForeignKey(
'fk_schedule_template',
'trigger_schedule', 'template_id',
'message_template', 'id'
);
}
public function down()
{
$this->dropForeignKey(
'fk_schedule_template',
'trigger_schedule'
);
$this->dropColumn(
'trigger_schedule',
'template_id'
);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment