task priority, comments
This commit is contained in:
@ -20,7 +20,7 @@ class m211020_133147_create_user_questionnaire_table extends Migration
|
||||
'created_at' => $this->dateTime(),
|
||||
'updated_at' => $this->dateTime(),
|
||||
'score' => $this->integer(),
|
||||
'status' => $this->integer(),
|
||||
'status' => $this->integer()->defaultValue(1),
|
||||
|
||||
|
||||
]);
|
||||
|
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Class m230511_201352_add_priority_column_at_project_task_table
|
||||
*/
|
||||
class m230511_201352_add_priority_column_at_project_task_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->addColumn('project_task', 'priority', $this->integer(2)->defaultValue(1));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropColumn('project_task', 'priority');
|
||||
}
|
||||
|
||||
/*
|
||||
// Use up()/down() to run migration code without a transaction.
|
||||
public function up()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
echo "m230511_201352_add_priority_column_at_project_task_table cannot be reverted.\n";
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
35
console/migrations/m230511_205501_create_comment_table.php
Normal file
35
console/migrations/m230511_205501_create_comment_table.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use yii\db\Migration;
|
||||
|
||||
/**
|
||||
* Handles the creation of table `{{%comment}}`.
|
||||
*/
|
||||
class m230511_205501_create_comment_table extends Migration
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeUp()
|
||||
{
|
||||
$this->createTable('{{%comment}}', [
|
||||
'id' => $this->primaryKey(),
|
||||
'created_at' => $this->dateTime(),
|
||||
'updated_at' => $this->dateTime(),
|
||||
'user_id' => $this->integer(11),
|
||||
'parent_id' => $this->integer(11),
|
||||
'entity_type' => $this->integer(2),
|
||||
'entity_id' => $this->integer(11),
|
||||
'status' => $this->integer(1),
|
||||
'text' => $this->text()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropTable('{{%comment}}');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user