Skip to content

Commit

Permalink
Add migration for show_published_at column
Browse files Browse the repository at this point in the history
  • Loading branch information
saiat3 committed May 2, 2018
1 parent 8f1600e commit 897d4e1
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

use yii\db\Migration;

/**
* Class m180502_132704_alter_table_article_add_column_show_published_at
*/
class m180502_132704_alter_table_article_add_column_show_published_at extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn("{{%article}}",'show_published_at',$this->boolean()->null()->after('published_at'));
}

/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn("{{%article}}",'show_published_at');
}
}

0 comments on commit 897d4e1

Please sign in to comment.