add coronavirus activate/inactivate
This commit is contained in:
43
console/migrations/m200418_053358_add_active_fields.php
Normal file
43
console/migrations/m200418_053358_add_active_fields.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m200418_053358_add_active_fields
|
||||
*/
|
||||
class m200418_053358_add_active_fields extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
// add
|
||||
$this->addColumn('card', 'inactivated_at',$this->date() );
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
echo "m200418_053358_add_active_fields cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m200418_053358_add_active_fields cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user