Browse Source

修改运费模板基础价格和基础数量字段

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
b3e333fdde
  1. 26
      console/migrations/m191204_012240_update_columns_basic_price_basic_amount_in_table_ats_express_template.php

26
console/migrations/m191204_012240_update_columns_basic_price_basic_amount_in_table_ats_express_template.php

@ -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;
}
}
Loading…
Cancel
Save