From b3e333fdde8ee4a5c9e45dfd29d207760b832b4c Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Wed, 4 Dec 2019 15:16:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=B4=B9=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=9F=BA=E7=A1=80=E4=BB=B7=E6=A0=BC=E5=92=8C=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=95=B0=E9=87=8F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...c_amount_in_table_ats_express_template.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 console/migrations/m191204_012240_update_columns_basic_price_basic_amount_in_table_ats_express_template.php diff --git a/console/migrations/m191204_012240_update_columns_basic_price_basic_amount_in_table_ats_express_template.php b/console/migrations/m191204_012240_update_columns_basic_price_basic_amount_in_table_ats_express_template.php new file mode 100644 index 0000000..8abec78 --- /dev/null +++ b/console/migrations/m191204_012240_update_columns_basic_price_basic_amount_in_table_ats_express_template.php @@ -0,0 +1,26 @@ +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; + } +}