db->createCommand($sql)->execute(); if(!empty($res)) return ''; $sql="CREATE TABLE `qimall_addons_cloud_stock_bonus_pool_log` ( `id` int(10) NOT NULL AUTO_INCREMENT, `mall_id` int(11) NOT NULL COMMENT '商城ID', `level` int(11) NOT NULL DEFAULT '0' COMMENT '分红池等级', `start` bigint(20) NOT NULL DEFAULT '0' COMMENT '开始时间', `end` bigint(20) NOT NULL DEFAULT '0' COMMENT '结束时间', `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '当前分红池金额', `dispatch_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '分出去金额', `people` int(11) NOT NULL DEFAULT '0' COMMENT '人数', `is_upgrade_bag_give_goods_pool` tinyint(1) NOT NULL DEFAULT '0' COMMENT '开启云仓代理升级礼包赠送的商品计算补货盒数,关闭则不计算', `is_superposition` tinyint(1) NOT NULL DEFAULT '0' COMMENT '分红池开关:每个分红池可以开启是否可以叠加分红,开启则进行叠加,关闭则不叠加', `pool_settlement_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '结算类型:0:月;1:季度', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]', `created_at` bigint(20) DEFAULT NULL, `updated_at` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='云库存分红池记录';"; $this->execute($sql); }catch (\Exception $e){ } } /** * {@inheritdoc} */ public function safeDown() { echo "M230717100157QimallAddonsCloudStockBonusPoolLog cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M230717100157QimallAddonsCloudStockBonusPoolLog cannot be reverted.\n"; return false; } */ }