Merge branch 'master' into for_managers_show_only_employees
# Conflicts: # console/controllers/RbacController.php
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m230118_120338_rename_task_table_to_project_task
|
||||
*/
|
||||
class m230118_120338_rename_task_table_to_project_task extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->renameTable('task', 'project_task');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->renameTable('project_task', 'task');
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m230118_120338_rename_task_table_to_project_task cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m230118_120405_rename_task_user_table_to_project_task_user
|
||||
*/
|
||||
class m230118_120405_rename_task_user_table_to_project_task_user extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->renameTable('task_user', 'project_task_user');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->renameTable('project_task_user', 'task_user');
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m230118_120405_rename_task_user_table_to_project_task_user cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
28
console/migrations/m230123_084421_create_mark_table.php
Normal file
28
console/migrations/m230123_084421_create_mark_table.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Handles the creation of table `{{%mark}}`.
|
||||
*/
|
||||
class m230123_084421_create_mark_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->createTable('{{%mark}}', [
|
||||
'id' => $this->primaryKey(),
|
||||
'title' => $this->string()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropTable('{{%mark}}');
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Handles the creation of table `{{%project_mark}}`.
|
||||
*/
|
||||
class m230123_084629_create_project_mark_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->createTable('{{%project_mark}}', [
|
||||
'id' => $this->primaryKey(),
|
||||
'project_id' => $this->integer(),
|
||||
'mark_id' => $this->integer(),
|
||||
]);
|
||||
$this->addForeignKey('project_mark_project', 'project_mark', 'project_id', 'project', 'id');
|
||||
$this->addForeignKey('project_mark_mark', 'project_mark', 'mark_id', 'mark', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropForeignKey('project_mark_project', 'project_mark');
|
||||
$this->dropForeignKey('project_mark_mark', 'project_mark');
|
||||
$this->dropTable('{{%project_mark}}');
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m230221_181446_add_partner_to_status_table
|
||||
*/
|
||||
class m230221_181446_add_partner_to_status_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->insert('status',
|
||||
[
|
||||
'name' => 'Партнер',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->delete('status', ['name' => 'Партнер']);
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m230221_181446_add_partner_to_status_table cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
Reference in New Issue
Block a user