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; + } +}