Commit 5136b56a authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлена миграция по расписанию рассылок по блогам

parent c389c465
<?php
use yii\db\Migration;
class m160426_105524_add_blog_schedule extends Migration
{
public function up()
{
$this->createTable(
'blog_schedule',
[
'id' => $this->primaryKey(),
'email' => $this->string(255)->notNull(),
'post_id' => $this->integer(11)->notNull(),
'date' => $this->date()->notNull()
]
);
$this->addForeignKey(
'fk_blog_schedule_post_id',
'blog_schedule', 'post_id',
'posts', 'id'
);
}
public function down()
{
$this->dropForeignKey(
'fk_blog_schedule_post_id',
'blog_schedule'
);
$this->dropTable('blog_schedule');
}
}
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