task users, set priority at column and task, timer entity
This commit is contained in:
33
console/migrations/m230522_211727_create_timer_table.php
Normal file
33
console/migrations/m230522_211727_create_timer_table.php
Normal 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}}');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user