db->createCommand($sql)->execute(); if(!empty($res)) return ''; $sql="CREATE TABLE `qimall_addons_cloud_stock_bonus_pool_level` ( `id` int(11) NOT NULL AUTO_INCREMENT, `mall_id` int(11) NOT NULL COMMENT '商城id', `level` int(11) NOT NULL DEFAULT '0' COMMENT '等级权重id', `cloud_stock_level` varchar(5000) NOT NULL DEFAULT '' COMMENT '代理等级', `name` varchar(255) NOT NULL COMMENT '等级名称', `checked_condition_values` longtext COMMENT '升级条件', `checked_condition_keys` text COMMENT '升级条件选中的key集合', `condition_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 未选择、1满足其一 2、满足所有', `upgrade_type_condition` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启条件升级', `explain` varchar(5000) NOT NULL DEFAULT '' COMMENT '等级说明', `money` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '当前池金额', `total_money` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '累计池金额', `goods_setting` text COMMENT '商品设置', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]', `created_at` bigint(20) NOT NULL DEFAULT '0', `updated_at` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='云库存分红等级';"; $this->execute($sql); }catch (\Exception $e){ } } /** * {@inheritdoc} */ public function safeDown() { echo "M230717100126QimallAddonsCloudStockBonusPoolLevel cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M230717100126QimallAddonsCloudStockBonusPoolLevel cannot be reverted.\n"; return false; } */ }