task users, set priority at column and task, timer entity

This commit is contained in:
2023-05-23 02:11:44 +03:00
parent c50dc189a7
commit 5da6746cc4
12 changed files with 794 additions and 8 deletions

View File

@ -0,0 +1,33 @@
<?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%timer}}`.
*/
class m230522_211727_create_timer_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%timer}}', [
'id' => $this->primaryKey(),
'created_at' => $this->dateTime(),
'stopped_at' => $this->dateTime(),
'user_id' => $this->integer(11)->notNull(),
'entity_type' => $this->integer(2)->notNull(),
'entity_id' => $this->integer(11)->notNull(),
'status' => $this->integer(1)->defaultValue(1),
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('{{%timer}}');
}
}