db->createCommand($sql)->execute(); if(!empty($res)) return ''; $sql=" CREATE TABLE `qimall_wechat_send_message_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `mall_id` int(11) NOT NULL DEFAULT '0' COMMENT '商城ID', `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员id', `openid` varbinary(255) NOT NULL DEFAULT '' COMMENT 'openid', `send_data` text COMMENT '发送参数', `result_data` text COMMENT '返回参数', `updated_at` int(11) NOT NULL DEFAULT '0', `created_at` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='公众号发送模板消息日志'; "; $this->execute($sql); }catch (\Exception $e){ } } /** * {@inheritdoc} */ public function safeDown() { echo "M230911020254QimallWechatSendMessageLog cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M230911020254QimallWechatSendMessageLog cannot be reverted.\n"; return false; } */ }