forked from meolu/walle-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
use yii\db\Migration; | ||
use yii\db\Schema; | ||
use app\models\Task; | ||
|
||
class m160420_015223_add_file_transmission_mode extends Migration | ||
{ | ||
public function up() | ||
{ | ||
|
||
$this->alterColumn(Task::tableName(), 'created_at', Schema::TYPE_DATETIME . ' COMMENT "创建时间" AFTER enable_rollback'); | ||
$this->alterColumn(Task::tableName(), 'updated_at', Schema::TYPE_DATETIME . ' COMMENT "修改时间" AFTER created_at'); | ||
|
||
$this->addColumn(Task::tableName(), 'file_transmission_mode', Schema::TYPE_SMALLINT . '(3) NOT NULL DEFAULT 1 COMMENT "上线文件模式: 1.全量所有文件 2.指定文件列表" AFTER branch'); | ||
} | ||
|
||
public function down() | ||
{ | ||
$this->dropColumn(Task::tableName(), 'file_transmission_mode'); | ||
echo "m160420_015223_add_file_transmission_mode was reverted.\n"; | ||
|
||
return true; | ||
} | ||
|
||
/* | ||
// Use safeUp/safeDown to run migration code within a transaction | ||
public function safeUp() | ||
{ | ||
} | ||
public function safeDown() | ||
{ | ||
} | ||
*/ | ||
} |