|
@ -0,0 +1,26 @@ |
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
use yii\db\Migration; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Class m191204_012240_update_columns_basic_price_basic_amount_in_table_ats_express_template |
|
|
|
|
|
*/ |
|
|
|
|
|
class m191204_012240_update_columns_basic_price_basic_amount_in_table_ats_express_template extends Migration |
|
|
|
|
|
{ |
|
|
|
|
|
public function up() |
|
|
|
|
|
{ |
|
|
|
|
|
$this->dropColumn('ats_express_template', 'basic_price'); |
|
|
|
|
|
$this->dropColumn('ats_express_template', 'basic_amount'); |
|
|
|
|
|
$this->addColumn('ats_express_template', 'basic_price', $this->integer(20)->unsigned()->defaultValue(0)->notNull()->comment('基本运费')); |
|
|
|
|
|
$this->addColumn('ats_express_template', 'basic_amount', $this->integer(20)->unsigned()->defaultValue(1)->notNull()->comment('基本数量')); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function down() |
|
|
|
|
|
{ |
|
|
|
|
|
$this->dropColumn('ats_express_template', 'basic_price'); |
|
|
|
|
|
$this->dropColumn('ats_express_template', 'basic_amount'); |
|
|
|
|
|
$this->addColumn('ats_express_template', 'basic_price', $this->integer(20)->defaultValue(0)->comment('基本运费')); |
|
|
|
|
|
$this->addColumn('ats_express_template', 'basic_amount', $this->integer(20)->defaultValue(0)->comment('基本数量')); |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
} |