* миграция на минуты

This commit is contained in:
anatolidew 2021-11-23 11:03:19 +03:00
parent 28294fc8ca
commit b45e9a9033

View File

@ -0,0 +1,25 @@
<?php
use yii\db\Migration;
/**
* Handles adding columns to table `{{%reports_task}}`.
*/
class m211122_144548_add_column_to_reports_task_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('reports_task', 'minutes_spent', $this->integer()->defaultValue(0)->notNull());
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropColumn('reports_task', 'minutes_spent' );
}
}