execute($sql); $sql = "ALTER TABLE `qimall_addons_cloud_stock_fill_statistics` ADD COLUMN `award_proportion_calculate_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '计算方式'"; $this->execute($sql); $sql = "CREATE TABLE `qimall_addons_cloud_stock_increase_by_platform_log` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id', `mall_id` int(11) NOT NULL COMMENT '商城id', `user_id` int(11) NOT NULL COMMENT '增加库存代理商用户id', `goods_id` int(11) NOT NULL COMMENT '商品id', `changes_type` int(11) NOT NULL COMMENT '库存变动类型;100向上级补货;101上级给自己配货;102退货退库存;103系统添加;104平台补货赠送;105购买礼包赠送;', `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id', `order_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'order类型,1:会员购买订单,2:补货订单;', `num` int(11) NOT NULL COMMENT '增加数量', `fill_unit_price` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '补货单价', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]', `created_at` int(11) NOT NULL DEFAULT '0', `updated_at` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='补货记录表';"; $this->execute($sql); } /** * {@inheritdoc} */ public function safeDown() { echo "M230904102932CloudStockFillStatisticsUpdate cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M230904102932CloudStockFillStatisticsUpdate cannot be reverted.\n"; return false; } */ }