changed the creator for tasks from project_user to user, fixed api, documentation, filters, some other fixes

This commit is contained in:
iIronside
2021-12-06 15:13:31 +03:00
parent daae8b16b6
commit e78ff7d779
23 changed files with 6024 additions and 117 deletions

View File

@ -0,0 +1,32 @@
<?php
use yii\db\Migration;
/**
* Class m211203_123444_changing_foreign_key_in_task_from_project_user_id_to_user_id
*/
class m211203_123444_changing_foreign_key_in_task_from_project_user_id_to_user_id extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->dropForeignKey('task_project_user', 'task');
$this->dropColumn('task', 'project_user_id');
$this->addColumn('task', 'user_id_creator', $this->integer());
$this->addForeignKey('creator_task', 'task', 'user_id_creator', 'user', 'id');
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropForeignKey('creator_task', 'task');
$this->dropColumn('task', 'user_id_creator');
$this->addColumn('task', 'project_user_id', $this->integer());
$this->addForeignKey('task_project_user', 'task',
'project_user_id', 'project_user', 'id');
}
}