wpfw_ewei_shopv2/ru_rpgrade.php
2023-02-14 19:57:32 +08:00

23531 lines
1.1 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$sql="
CREATE TABLE IF NOT EXISTS `ims_ewei_message_mass_sign` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT NULL,
`nickname` varchar(50) DEFAULT NULL,
`taskid` int(11) DEFAULT NULL,
`status` tinyint(1) DEFAULT NULL,
`log` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_openid` (`openid`),
KEY `idx_taskid` (`taskid`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_message_mass_task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`status` tinyint(1) DEFAULT '0',
`processnum` int(11) DEFAULT '1',
`sendnum` int(11) DEFAULT '0',
`messagetype` tinyint(1) DEFAULT '0',
`templateid` int(11) DEFAULT '0',
`resptitle` varchar(255) DEFAULT NULL,
`respthumb` varchar(255) DEFAULT NULL,
`respdesc` varchar(255) DEFAULT NULL,
`respurl` varchar(255) DEFAULT NULL,
`sendlimittype` tinyint(1) DEFAULT '0',
`send_openid` text,
`send_level` int(11) DEFAULT NULL,
`send_group` int(11) DEFAULT NULL,
`send_agentlevel` int(11) DEFAULT NULL,
`customertype` tinyint(1) DEFAULT '0',
`resdesc2` text,
`pagecount` int(11) DEFAULT '0',
`successnum` int(11) DEFAULT '0',
`failnum` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_message_mass_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`template_id` varchar(255) DEFAULT '',
`first` text NOT NULL,
`firstcolor` varchar(255) DEFAULT '',
`data` text NOT NULL,
`remark` text NOT NULL,
`remarkcolor` varchar(255) DEFAULT '',
`url` varchar(255) NOT NULL,
`createtime` int(11) DEFAULT '0',
`sendtimes` int(11) DEFAULT '0',
`sendcount` int(11) DEFAULT '0',
`miniprogram` tinyint(1) DEFAULT '0',
`appid` varchar(255) DEFAULT '',
`pagepath` varchar(255) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_advertisement` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`name` varchar(8) DEFAULT NULL,
`logo` text,
`url` text,
`create_time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_chicken` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`openid` varchar(64) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL,
`portrait` text,
`level` int(11) unsigned NOT NULL DEFAULT '0',
`experience` int(11) unsigned NOT NULL DEFAULT '0',
`accelerate` int(11) unsigned NOT NULL DEFAULT '0',
`egg_stock` int(11) unsigned NOT NULL DEFAULT '0',
`last_egg_stock` int(11) unsigned NOT NULL DEFAULT '0',
`feed_stock` int(11) unsigned NOT NULL DEFAULT '0',
`bowl_stock` int(11) unsigned NOT NULL DEFAULT '0',
`integral` int(11) unsigned NOT NULL DEFAULT '0',
`feeding_time` datetime DEFAULT NULL,
`feeding_sum` int(11) unsigned NOT NULL DEFAULT '0',
`lay_eggs_eat` int(11) unsigned NOT NULL DEFAULT '0',
`lay_eggs_sum` int(11) unsigned NOT NULL DEFAULT '0',
`eat_sum` int(11) unsigned NOT NULL DEFAULT '0',
`surprised_guard` int(11) unsigned NOT NULL DEFAULT '0',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_configure` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`name` varchar(64) DEFAULT NULL,
`url` text,
`qrcode` text,
`keyword` varchar(64) DEFAULT NULL,
`title` text,
`logo` text,
`describe` text,
`public_qrcode` text,
`force_follow` enum('1','0') NOT NULL DEFAULT '0',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_egg` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`openid` varchar(64) DEFAULT NULL,
`sum` int(11) unsigned NOT NULL DEFAULT '0',
`use_sum` int(11) unsigned NOT NULL DEFAULT '0',
`status` enum('是','否') NOT NULL DEFAULT '否',
`receive` enum('是','否') NOT NULL DEFAULT '否',
`use_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_grade` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`level` int(11) unsigned NOT NULL DEFAULT '0',
`experience` int(11) unsigned NOT NULL DEFAULT '0',
`accelerate` int(11) unsigned NOT NULL DEFAULT '0',
`surprised_guard` int(11) unsigned NOT NULL DEFAULT '0',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_indicate` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`image` text,
`describe` text,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_integral` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`openid` varchar(64) DEFAULT NULL,
`nickname` varchar(64) DEFAULT NULL,
`order_id` varchar(128) DEFAULT NULL,
`integral` int(11) unsigned NOT NULL DEFAULT '0',
`egg` int(11) unsigned NOT NULL DEFAULT '0',
`receive` enum('是','否') NOT NULL DEFAULT '否',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`category` enum('获取优惠券','获取积分','获取鸡蛋','获取饲料','获取道具卡','兑换商品') NOT NULL DEFAULT '获取优惠券',
`describe` text,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_market` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`title` varchar(8) DEFAULT NULL,
`type` enum('商品','积分') NOT NULL DEFAULT '积分',
`value` int(11) unsigned NOT NULL DEFAULT '0',
`egg` int(11) unsigned NOT NULL DEFAULT '0',
`logo` text,
`number` int(11) unsigned NOT NULL DEFAULT '0',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_mood` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`background` text,
`logo` text,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_mood_image` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`picture` text,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_notice` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`title` varchar(64) DEFAULT NULL,
`content` longtext,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_order` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`openid` varchar(64) DEFAULT NULL,
`username` varchar(64) DEFAULT NULL,
`market_id` int(11) unsigned NOT NULL DEFAULT '0',
`market_title` varchar(64) DEFAULT NULL,
`receive` enum('1','0') NOT NULL DEFAULT '0',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_presentation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`openid` varchar(64) DEFAULT NULL,
`content` text,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_prop` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`name` varchar(64) NOT NULL DEFAULT '',
`logo` text,
`deposit_max` int(11) unsigned NOT NULL DEFAULT '0',
`day_use_max` int(11) unsigned NOT NULL DEFAULT '0',
`effect` enum('进食加速','新单卡','其它') NOT NULL DEFAULT '其它',
`value` text,
`get_category` enum('完成任务','积分兑换','购买商品') NOT NULL DEFAULT '完成任务',
`get_value` text,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_reply` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`brief_introduce` text,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_seting` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`eat_time` int(11) unsigned NOT NULL DEFAULT '0',
`time_steal` int(11) unsigned NOT NULL DEFAULT '0',
`steal_eat_time` int(11) unsigned NOT NULL DEFAULT '0',
`eat_tips` varchar(64) NOT NULL DEFAULT '',
`warehouse` int(11) unsigned NOT NULL DEFAULT '0',
`bowl` int(11) unsigned NOT NULL DEFAULT '0',
`lay_eggs_eat` int(11) unsigned NOT NULL DEFAULT '0',
`lay_eggs_tips` varchar(64) NOT NULL DEFAULT '',
`lay_eggs_number_min` int(11) unsigned NOT NULL DEFAULT '0',
`lay_eggs_number_max` int(11) unsigned NOT NULL DEFAULT '0',
`obtain_feed_max` int(11) unsigned NOT NULL DEFAULT '0',
`exchange_integral_max` int(11) unsigned NOT NULL DEFAULT '0',
`feed_invalid_time` int(11) unsigned NOT NULL DEFAULT '0',
`egg_invalid_time` int(11) unsigned NOT NULL DEFAULT '0',
`surprised_invalid_time` int(11) unsigned NOT NULL DEFAULT '0',
`eat_experience` int(11) unsigned NOT NULL DEFAULT '0',
`rate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`advertisement_max` int(11) unsigned NOT NULL DEFAULT '1',
`surprised_probability` int(11) unsigned NOT NULL DEFAULT '1',
`shop` text,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_surprised` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`category` enum('优惠券','积分') NOT NULL DEFAULT '优惠券',
`value` text,
`probability` int(11) unsigned NOT NULL DEFAULT '0',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_task` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`logo` text,
`title` varchar(64) NOT NULL DEFAULT '',
`feed` int(11) unsigned NOT NULL DEFAULT '0',
`order_feed` int(11) unsigned NOT NULL DEFAULT '0',
`money_feed` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0',
`goods_feed` int(11) unsigned NOT NULL DEFAULT '0',
`get_max` int(11) unsigned NOT NULL DEFAULT '0',
`core` int(11) unsigned NOT NULL DEFAULT '0',
`core_feed` int(11) unsigned NOT NULL DEFAULT '0',
`member_level` int(11) unsigned NOT NULL DEFAULT '0',
`member_level_feed` int(11) unsigned NOT NULL DEFAULT '0',
`start_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`category` enum('签到','任务中心','购买商品','商城下单','会员领取') NOT NULL DEFAULT '签到',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_threshold` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`free` enum('1','0') DEFAULT NULL,
`goods` int(11) unsigned NOT NULL DEFAULT '0',
`level` int(11) unsigned NOT NULL DEFAULT '0',
`consumption` enum('1','0') DEFAULT NULL,
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`name` varchar(64) NOT NULL DEFAULT '',
`openid` varchar(56) DEFAULT NULL,
`tofakeid` varchar(56) DEFAULT NULL,
`follow` enum('0','1') NOT NULL DEFAULT '1',
`consume` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0',
`portrait` text,
`autograph` text,
`sex` enum('男','女') NOT NULL DEFAULT '男',
`birthday` date DEFAULT NULL,
`distribution` enum('0','1') NOT NULL DEFAULT '1',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_user_friend` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`active_id` int(11) unsigned NOT NULL DEFAULT '0',
`active_name` varchar(64) NOT NULL DEFAULT '',
`active_openid` varchar(56) DEFAULT NULL,
`active_tofakeid` varchar(56) DEFAULT NULL,
`passive_id` int(11) unsigned NOT NULL DEFAULT '0',
`passive_name` varchar(64) NOT NULL DEFAULT '',
`passive_openid` varchar(56) DEFAULT NULL,
`passive_tofakeid` varchar(56) DEFAULT NULL,
`agree` enum('是','等待中','否') NOT NULL DEFAULT '等待中',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_user_prop` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`user_id` int(11) unsigned NOT NULL DEFAULT '0',
`prop_id` int(11) unsigned NOT NULL DEFAULT '0',
`total` int(11) unsigned NOT NULL DEFAULT '0',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_user_surprised` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`openid` varchar(64) DEFAULT NULL,
`surprised_id` int(11) unsigned NOT NULL DEFAULT '0',
`status` enum('是','否') NOT NULL DEFAULT '否',
`use` enum('是','否') NOT NULL DEFAULT '否',
`receive` enum('是','否') NOT NULL DEFAULT '否',
`use_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_open_farm_user_task` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL DEFAULT '0',
`openid` varchar(56) DEFAULT NULL,
`task_id` int(11) unsigned NOT NULL DEFAULT '0',
`rid` int(11) unsigned NOT NULL DEFAULT '0',
`order_sum` int(11) unsigned NOT NULL DEFAULT '0',
`order_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`goods_sum` int(11) unsigned NOT NULL DEFAULT '0',
`status` enum('进行中','已完成','已领取') NOT NULL DEFAULT '进行中',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_abonus_bill` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billno` varchar(100) DEFAULT '',
`paytype` int(11) DEFAULT '0',
`year` int(11) DEFAULT '0',
`month` int(11) DEFAULT '0',
`week` int(11) DEFAULT '0',
`ordercount` int(11) DEFAULT '0',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`paytime` int(11) DEFAULT '0',
`aagentcount1` int(11) DEFAULT '0',
`aagentcount2` int(11) DEFAULT '0',
`aagentcount3` int(11) DEFAULT '0',
`bonusmoney1` decimal(10,2) DEFAULT '0.00',
`bonusmoney_send1` decimal(10,2) DEFAULT '0.00',
`bonusmoney_pay1` decimal(10,2) DEFAULT '0.00',
`bonusmoney2` decimal(10,2) DEFAULT '0.00',
`bonusmoney_send2` decimal(10,2) DEFAULT '0.00',
`bonusmoney_pay2` decimal(10,2) DEFAULT '0.00',
`bonusmoney3` decimal(10,2) DEFAULT '0.00',
`bonusmoney_send3` decimal(10,2) DEFAULT '0.00',
`bonusmoney_pay3` decimal(10,2) DEFAULT '0.00',
`createtime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`starttime` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`confirmtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_createtime` (`createtime`),
KEY `idx_month` (`month`),
KEY `idx_paytime` (`paytime`),
KEY `idx_paytype` (`paytype`),
KEY `idx_status` (`status`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_week` (`week`),
KEY `idx_year` (`year`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_abonus_billo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billid` int(11) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`ordermoney` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_billid` (`billid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_abonus_billp` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`payno` varchar(255) DEFAULT '',
`paytype` tinyint(3) DEFAULT '0',
`bonus1` decimal(10,4) DEFAULT '0.0000',
`bonus2` decimal(10,4) DEFAULT '0.0000',
`bonus3` decimal(10,4) DEFAULT '0.0000',
`money1` decimal(10,2) DEFAULT '0.00',
`realmoney1` decimal(10,2) DEFAULT '0.00',
`paymoney1` decimal(10,2) DEFAULT '0.00',
`money2` decimal(10,2) DEFAULT '0.00',
`realmoney2` decimal(10,2) DEFAULT '0.00',
`paymoney2` decimal(10,2) DEFAULT '0.00',
`money3` decimal(10,2) DEFAULT '0.00',
`realmoney3` decimal(10,2) DEFAULT '0.00',
`paymoney3` decimal(10,2) DEFAULT '0.00',
`chargemoney1` decimal(10,2) DEFAULT '0.00',
`chargemoney2` decimal(10,2) DEFAULT '0.00',
`chargemoney3` decimal(10,2) DEFAULT '0.00',
`charge` decimal(10,2) DEFAULT '0.00',
`status` tinyint(3) DEFAULT '0',
`reason` varchar(255) DEFAULT '',
`paytime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_billid` (`billid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_abonus_level` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`levelname` varchar(50) DEFAULT '',
`bonus1` decimal(10,4) DEFAULT '0.0000',
`bonus2` decimal(10,4) DEFAULT '0.0000',
`bonus3` decimal(10,4) DEFAULT '0.0000',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`ordercount` int(11) DEFAULT '0',
`bonusmoney` decimal(10,2) DEFAULT '0.00',
`downcount` int(11) DEFAULT '0',
`commissionmoney` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_address_applyfor` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`openid` varchar(11) DEFAULT NULL,
`data` text,
`orderid` int(11) DEFAULT NULL,
`ordersn` varchar(255) DEFAULT NULL,
`isdispose` tinyint(1) DEFAULT '0',
`message` varchar(255) DEFAULT NULL,
`createtime` int(11) DEFAULT NULL,
`ispass` tinyint(1) DEFAULT '0',
`isdelete` tinyint(4) DEFAULT '0',
`isall` tinyint(4) DEFAULT '0',
`old_address` text,
`cycleid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
`shopid` int(11) DEFAULT '0',
`iswxapp` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_af_supplier` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`openid` varchar(255) NOT NULL,
`uniacid` int(11) NOT NULL,
`realname` varchar(55) NOT NULL,
`mobile` varchar(255) NOT NULL,
`weixin` varchar(255) NOT NULL,
`productname` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_area_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`new_area` tinyint(3) NOT NULL DEFAULT '0',
`address_street` tinyint(3) NOT NULL DEFAULT '0',
`createtime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`article_title` varchar(255) NOT NULL DEFAULT '' COMMENT '文章标题',
`resp_desc` text NOT NULL COMMENT '回复介绍',
`resp_img` text NOT NULL COMMENT '回复图片',
`article_content` longtext,
`article_category` int(11) NOT NULL DEFAULT '0' COMMENT '文章分类',
`article_date_v` varchar(20) NOT NULL DEFAULT '' COMMENT '虚拟发布时间',
`article_date` varchar(20) NOT NULL DEFAULT '' COMMENT '文章发布时间',
`article_mp` varchar(50) NOT NULL DEFAULT '' COMMENT '公众号',
`article_author` varchar(20) NOT NULL DEFAULT '' COMMENT '发布作者',
`article_readnum_v` int(11) NOT NULL DEFAULT '0' COMMENT '虚拟阅读量',
`article_readnum` int(11) NOT NULL DEFAULT '0' COMMENT '真实阅读量',
`article_likenum_v` int(11) NOT NULL DEFAULT '0' COMMENT '虚拟点赞数',
`article_likenum` int(11) NOT NULL DEFAULT '0' COMMENT '真实点赞数',
`article_linkurl` varchar(300) NOT NULL DEFAULT '' COMMENT '阅读原文链接',
`article_rule_daynum` int(11) NOT NULL DEFAULT '0' COMMENT '每人每天参与次数',
`article_rule_allnum` int(11) NOT NULL DEFAULT '0' COMMENT '所有参与次数',
`article_rule_credit` int(11) NOT NULL DEFAULT '0' COMMENT '增加y积分',
`article_rule_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '增加z余额',
`page_set_option_nocopy` int(1) NOT NULL DEFAULT '0' COMMENT '页面禁止复制url',
`page_set_option_noshare_tl` int(1) NOT NULL DEFAULT '0' COMMENT '页面禁止分享至朋友圈',
`page_set_option_noshare_msg` int(1) NOT NULL DEFAULT '0' COMMENT '页面禁止发送给好友',
`article_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '页面关键字',
`article_report` int(1) NOT NULL DEFAULT '0' COMMENT '举报按钮',
`product_advs_type` int(1) NOT NULL DEFAULT '0' COMMENT '营销显示产品',
`product_advs_title` varchar(255) NOT NULL DEFAULT '' COMMENT '营销产品标题',
`product_advs_more` varchar(255) NOT NULL DEFAULT '' COMMENT '推广产品底部标题',
`product_advs_link` varchar(255) NOT NULL DEFAULT '' COMMENT '推广产品底部链接',
`product_advs` text NOT NULL COMMENT '营销商品',
`article_state` int(1) NOT NULL DEFAULT '0',
`network_attachment` varchar(255) DEFAULT '',
`uniacid` int(11) NOT NULL DEFAULT '0',
`article_keyword2` varchar(255) NOT NULL DEFAULT '',
`article_rule_credittotal` int(11) DEFAULT '0',
`article_rule_moneytotal` decimal(10,2) DEFAULT '0.00',
`article_rule_credit2` int(11) NOT NULL DEFAULT '0',
`article_rule_money2` decimal(10,2) NOT NULL DEFAULT '0.00',
`article_rule_creditm` int(11) NOT NULL DEFAULT '0',
`article_rule_moneym` decimal(10,2) NOT NULL DEFAULT '0.00',
`article_rule_creditm2` int(11) NOT NULL DEFAULT '0',
`article_rule_moneym2` decimal(10,2) NOT NULL DEFAULT '0.00',
`article_readtime` int(11) DEFAULT '0',
`article_areas` varchar(255) DEFAULT '',
`article_endtime` int(11) DEFAULT '0',
`article_hasendtime` tinyint(3) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`article_advance` int(11) DEFAULT '0',
`article_virtualadd` tinyint(3) DEFAULT '0',
`article_visit` tinyint(3) DEFAULT '0',
`article_visit_level` text,
`article_visit_tip` varchar(500) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_article_title` (`article_title`),
KEY `idx_article_content` (`article_content`(10)),
KEY `idx_article_keyword` (`article_keyword`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='营销文章';
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_article_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名称',
`uniacid` int(11) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
`isshow` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_category_name` (`category_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='营销表单分类';
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_article_comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`articleid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`nickname` varchar(50) DEFAULT '',
`headimgurl` varchar(255) DEFAULT '',
`content` varchar(500) DEFAULT '',
`reply_createtime` int(11) DEFAULT NULL,
`createtime` int(11) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`reply_content` varchar(500) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_article_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`aid` int(11) NOT NULL DEFAULT '0' COMMENT '文章id',
`read` int(11) NOT NULL DEFAULT '0',
`like` int(11) NOT NULL DEFAULT '0',
`openid` varchar(255) NOT NULL DEFAULT '' COMMENT '用户openid',
`uniacid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_aid` (`aid`),
KEY `idx_openid` (`openid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='点赞/阅读记录';
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_article_report` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(255) NOT NULL DEFAULT '',
`aid` int(11) DEFAULT '0',
`cate` varchar(255) NOT NULL DEFAULT '',
`cons` varchar(255) NOT NULL DEFAULT '',
`uniacid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户举报记录';
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_article_share` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`aid` int(11) NOT NULL DEFAULT '0',
`share_user` int(11) NOT NULL DEFAULT '0' COMMENT '分享人',
`click_user` int(11) NOT NULL DEFAULT '0' COMMENT '点击人',
`click_date` varchar(20) NOT NULL DEFAULT '' COMMENT '执行时间',
`add_credit` int(11) NOT NULL DEFAULT '0' COMMENT '添加的积分',
`add_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '添加的余额',
`uniacid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_aid` (`aid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户分享数据';
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_article_sys` (
`uniacid` int(11) NOT NULL DEFAULT '0',
`article_message` varchar(255) NOT NULL DEFAULT '',
`article_title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
`article_image` varchar(300) NOT NULL DEFAULT '' COMMENT '图片',
`article_shownum` int(11) NOT NULL DEFAULT '0' COMMENT '每页数量',
`article_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '关键字',
`article_temp` int(11) NOT NULL DEFAULT '0',
`article_source` varchar(255) NOT NULL DEFAULT '',
`article_close_advanced` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`uniacid`),
KEY `idx_article_message` (`article_message`),
KEY `idx_article_keyword` (`article_keyword`),
KEY `idx_article_title` (`article_title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章设置';
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_author_bill` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billno` varchar(100) DEFAULT '',
`paytype` int(11) DEFAULT '0',
`year` int(11) DEFAULT '0',
`month` int(11) DEFAULT '0',
`week` int(11) DEFAULT '0',
`ordercount` int(11) DEFAULT '0',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`bonusordermoney` decimal(10,2) DEFAULT '0.00',
`bonusrate` decimal(10,2) DEFAULT '0.00',
`bonusmoney` decimal(10,2) DEFAULT '0.00',
`bonusmoney_send` decimal(10,2) DEFAULT '0.00',
`bonusmoney_pay` decimal(10,2) DEFAULT '0.00',
`paytime` int(11) DEFAULT '0',
`partnercount` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`starttime` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`confirmtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_paytype` (`paytype`),
KEY `idx_createtime` (`createtime`),
KEY `idx_paytime` (`paytime`),
KEY `idx_status` (`status`),
KEY `idx_month` (`month`),
KEY `idx_week` (`week`),
KEY `idx_year` (`year`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_author_billo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billid` int(11) DEFAULT '0',
`authorid` int(11) DEFAULT NULL,
`orderid` text,
`ordermoney` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_billid` (`billid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_author_billp` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`payno` varchar(255) DEFAULT '',
`paytype` tinyint(3) DEFAULT '0',
`bonus` decimal(10,2) DEFAULT '0.00',
`money` decimal(10,2) DEFAULT '0.00',
`realmoney` decimal(10,2) DEFAULT '0.00',
`paymoney` decimal(10,2) DEFAULT '0.00',
`charge` decimal(10,2) DEFAULT '0.00',
`chargemoney` decimal(10,2) DEFAULT '0.00',
`status` tinyint(3) DEFAULT '0',
`reason` varchar(255) DEFAULT '',
`paytime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_billid` (`billid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_author_level` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`levelname` varchar(50) DEFAULT '',
`bonus` decimal(10,4) DEFAULT '0.0000',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`ordercount` int(11) DEFAULT '0',
`commissionmoney` decimal(10,2) DEFAULT '0.00',
`bonusmoney` decimal(10,2) DEFAULT '0.00',
`downcount` int(11) DEFAULT '0',
`bonus_fg` varchar(500) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_author_team` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`teamno` varchar(50) DEFAULT '',
`year` int(11) DEFAULT '0',
`month` int(11) DEFAULT '0',
`team_count` int(11) DEFAULT '0',
`team_ids` longtext,
`status` tinyint(1) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`paytime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `teamno` (`teamno`),
KEY `year` (`year`),
KEY `month` (`month`),
KEY `status` (`status`),
KEY `createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_author_team_pay` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`teamid` int(11) DEFAULT '0',
`mid` int(11) DEFAULT '0',
`payno` varchar(255) DEFAULT '',
`money` decimal(10,2) DEFAULT '0.00',
`paymoney` decimal(10,2) DEFAULT '0.00',
`paytime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_teamid` (`teamid`),
KEY `idx_mid` (`mid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_badv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`badvname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
`shopid` int(11) DEFAULT '0',
`iswxapp` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_banner` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`bannername` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
`shopid` int(11) DEFAULT '0',
`iswxapp` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_bargain_account` (
`id` int(11) NOT NULL,
`mall_name` varchar(255) DEFAULT NULL,
`banner` varchar(255) DEFAULT NULL,
`mall_title` varchar(255) DEFAULT NULL,
`mall_content` varchar(255) DEFAULT NULL,
`mall_logo` varchar(255) DEFAULT NULL,
`message` int(11) DEFAULT '0',
`partin` int(11) DEFAULT '0',
`rule` text,
`end_message` int(11) DEFAULT '0',
`follow_swi` tinyint(1) NOT NULL DEFAULT '0',
`sharestyle` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_bargain_actor` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`goods_id` int(11) NOT NULL,
`now_price` decimal(9,2) NOT NULL,
`created_time` datetime NOT NULL,
`update_time` datetime NOT NULL,
`bargain_times` int(10) NOT NULL,
`openid` varchar(50) NOT NULL DEFAULT '',
`nickname` varchar(20) NOT NULL,
`head_image` varchar(200) NOT NULL,
`bargain_price` decimal(9,2) NOT NULL,
`status` tinyint(2) NOT NULL,
`account_id` int(11) NOT NULL,
`initiate` tinyint(4) NOT NULL DEFAULT '0',
`order` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_openid` (`openid`),
KEY `idx_account_id` (`account_id`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_bargain_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`goods_id` varchar(20) NOT NULL,
`end_price` decimal(10,2) NOT NULL,
`start_time` datetime NOT NULL,
`end_time` datetime NOT NULL,
`status` tinyint(2) NOT NULL,
`type` tinyint(2) NOT NULL,
`user_set` text,
`rule` text,
`act_times` int(11) NOT NULL,
`mode` tinyint(4) NOT NULL,
`total_time` int(11) NOT NULL,
`each_time` int(11) NOT NULL,
`time_limit` int(11) NOT NULL,
`probability` text NOT NULL,
`custom` varchar(255) DEFAULT NULL,
`maximum` int(11) DEFAULT NULL,
`initiate` tinyint(4) NOT NULL DEFAULT '0',
`myself` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `goods_id` (`goods_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_bargain_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`actor_id` int(11) NOT NULL,
`bargain_price` decimal(9,2) NOT NULL,
`openid` varchar(50) NOT NULL DEFAULT '',
`nickname` varchar(20) NOT NULL,
`head_image` varchar(200) NOT NULL,
`bargain_time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_openid` (`openid`),
KEY `idx_actor_id` (`actor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_carrier` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`realname` varchar(50) DEFAULT '',
`mobile` varchar(50) DEFAULT '',
`address` varchar(255) DEFAULT '',
`deleted` tinyint(1) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_deleted` (`deleted`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`catename` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_clearing` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cashierid` int(11) DEFAULT '0',
`clearno` varchar(64) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`money` decimal(10,2) DEFAULT '0.00',
`realmoney` decimal(10,2) DEFAULT '0.00',
`remark` varchar(500) DEFAULT '',
`orderids` text,
`createtime` int(11) DEFAULT '0',
`paytime` int(11) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
`paytype` tinyint(1) DEFAULT '0',
`payinfo` varchar(1000) DEFAULT '',
`charge` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `storeid` (`cashierid`),
KEY `status` (`status`),
KEY `createtime` (`createtime`),
KEY `deleted` (`deleted`),
KEY `clearno` (`clearno`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_goods` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cashierid` int(11) DEFAULT '0',
`createtime` int(10) unsigned DEFAULT '0',
`title` varchar(255) DEFAULT '',
`image` varchar(255) DEFAULT '',
`categoryid` tinyint(1) DEFAULT '0',
`price` decimal(10,2) DEFAULT '0.00',
`total` int(11) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`goodssn` varchar(50) DEFAULT '',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `cashierid` (`cashierid`),
KEY `goodssn` (`goodssn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_goods_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cashierid` int(11) DEFAULT '0',
`catename` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_cashierid` (`cashierid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_operator` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cashierid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`manageopenid` varchar(50) DEFAULT '',
`username` varchar(255) DEFAULT '',
`password` varchar(50) DEFAULT '',
`salt` varchar(8) DEFAULT '',
`perm` text,
`createtime` int(10) unsigned DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `cashierid` (`cashierid`),
KEY `manageopenid` (`manageopenid`),
KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`ordersn` varchar(255) DEFAULT '',
`price` decimal(10,2) DEFAULT '0.00',
`openid` varchar(50) DEFAULT '',
`payopenid` varchar(50) DEFAULT '',
`createtime` int(10) unsigned DEFAULT '0',
`status` tinyint(4) DEFAULT '0',
`paytime` int(10) unsigned DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_pay_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cashierid` int(11) DEFAULT '0',
`operatorid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`paytype` tinyint(3) DEFAULT NULL,
`logno` varchar(255) DEFAULT '',
`title` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`status` int(11) DEFAULT '0',
`money` decimal(10,2) DEFAULT '0.00',
`paytime` int(11) DEFAULT '0',
`is_applypay` tinyint(1) DEFAULT '0',
`randommoney` decimal(10,2) DEFAULT '0.00',
`enough` decimal(10,2) DEFAULT '0.00',
`mobile` varchar(20) DEFAULT '',
`deduction` decimal(10,2) DEFAULT '0.00',
`discountmoney` decimal(10,2) DEFAULT '0.00',
`discount` decimal(5,2) DEFAULT '0.00',
`isgoods` tinyint(1) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`orderprice` decimal(10,2) DEFAULT '0.00',
`goodsprice` decimal(10,2) DEFAULT '0.00',
`couponpay` decimal(10,2) DEFAULT '0.00',
`payopenid` varchar(50) DEFAULT '',
`nosalemoney` decimal(10,2) DEFAULT '0.00',
`coupon` int(11) DEFAULT '0',
`usecoupon` int(11) DEFAULT '0',
`usecouponprice` decimal(10,2) DEFAULT '0.00',
`present_credit1` int(11) DEFAULT '0',
`refundsn` varchar(50) DEFAULT '',
`refunduser` int(11) DEFAULT '0',
`client_ip` varchar(16) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`paytype`),
KEY `idx_createtime` (`createtime`),
KEY `idx_status` (`status`),
KEY `idx_storeid` (`cashierid`),
KEY `idx_logno` (`logno`),
KEY `is_applypay` (`is_applypay`),
KEY `orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_pay_log_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cashierid` int(11) DEFAULT '0',
`logid` int(11) DEFAULT '0',
`goodsid` int(11) DEFAULT '0',
`price` decimal(10,2) DEFAULT '0.00',
`total` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `logid` (`logid`),
KEY `goodsid` (`goodsid`),
KEY `cashierid` (`cashierid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_qrcode` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cashierid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`goodstitle` varchar(255) DEFAULT '',
`money` decimal(10,2) DEFAULT '0.00',
`createtime` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `cashierid` (`cashierid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_randommoney_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cashierid` int(11) DEFAULT '0',
`clientip` int(11) unsigned DEFAULT '0',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`randommoney` decimal(10,2) DEFAULT '0.00',
`expires_time` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_storeid` (`cashierid`),
KEY `idx_clientip` (`clientip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cashier_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`storeid` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`setmeal` tinyint(3) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`logo` varchar(255) DEFAULT '',
`manageopenid` varchar(50) DEFAULT '',
`isopen_commission` tinyint(1) DEFAULT '0',
`name` varchar(50) DEFAULT '',
`mobile` varchar(50) DEFAULT '',
`categoryid` int(11) DEFAULT '0',
`wechat_status` tinyint(1) DEFAULT '0',
`wechatpay` text,
`alipay_status` tinyint(1) DEFAULT '0',
`alipay` text,
`withdraw` decimal(10,2) DEFAULT '0.00',
`openid` varchar(50) DEFAULT '',
`diyformfields` text,
`diyformdata` text,
`createtime` int(11) DEFAULT '0',
`username` varchar(255) DEFAULT '',
`password` varchar(32) DEFAULT '',
`salt` char(8) DEFAULT '',
`lifetimestart` int(10) unsigned DEFAULT '0',
`lifetimeend` int(10) unsigned DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`set` longtext,
`deleted` tinyint(1) DEFAULT '0',
`can_withdraw` tinyint(1) DEFAULT '0',
`show_paytype` tinyint(1) DEFAULT '0',
`couponid` varchar(255) DEFAULT '',
`management` varchar(1000) DEFAULT '',
`notice_openids` varchar(500) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `openid` (`manageopenid`),
KEY `username` (`username`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0' COMMENT '所属帐号',
`name` varchar(50) DEFAULT NULL COMMENT '分类名称',
`thumb` varchar(255) DEFAULT NULL COMMENT '分类图片',
`parentid` int(11) DEFAULT '0' COMMENT '上级分类ID,0为第一级',
`isrecommand` int(10) DEFAULT '0',
`description` varchar(500) DEFAULT NULL COMMENT '分类介绍',
`displayorder` tinyint(3) unsigned DEFAULT '0' COMMENT '排序',
`enabled` tinyint(1) DEFAULT '1' COMMENT '是否开启',
`ishome` tinyint(3) DEFAULT '0',
`advimg` varchar(255) DEFAULT '',
`advurl` varchar(500) DEFAULT '',
`level` tinyint(3) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_enabled` (`enabled`),
KEY `idx_parentid` (`parentid`),
KEY `idx_isrecommand` (`isrecommand`),
KEY `idx_ishome` (`ishome`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_city_express` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`start_fee` decimal(10,2) DEFAULT '0.00',
`start_km` int(11) DEFAULT '0',
`pre_km` int(11) DEFAULT '0',
`pre_km_fee` decimal(10,2) DEFAULT '0.00',
`fixed_km` int(11) DEFAULT '0',
`fixed_fee` decimal(10,2) DEFAULT '0.00',
`receive_goods` int(11) DEFAULT NULL,
`lng` varchar(255) DEFAULT '',
`lat` varchar(255) DEFAULT '',
`range` int(11) DEFAULT '0',
`zoom` int(11) NOT NULL DEFAULT '13',
`express_type` int(11) NOT NULL DEFAULT '0',
`config` varchar(255) NOT NULL DEFAULT '',
`tel1` varchar(255) DEFAULT '',
`tel2` varchar(255) DEFAULT '',
`is_sum` tinyint(1) DEFAULT '0',
`is_dispatch` tinyint(1) DEFAULT '1',
`enabled` tinyint(1) DEFAULT '0',
`geo_key` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_apply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`applyno` varchar(255) DEFAULT '',
`mid` int(11) DEFAULT '0' COMMENT '会员ID',
`type` tinyint(3) DEFAULT '0' COMMENT '0 余额 1 微信',
`orderids` longtext,
`commission` decimal(10,2) DEFAULT '0.00',
`commission_pay` decimal(10,2) DEFAULT '0.00',
`content` text,
`status` tinyint(3) DEFAULT '0' COMMENT '-1 无效 0 未知 1 正在申请 2 审核通过 3 已经打款',
`applytime` int(11) DEFAULT '0',
`checktime` int(11) DEFAULT '0',
`paytime` int(11) DEFAULT '0',
`invalidtime` int(11) DEFAULT '0',
`refusetime` int(11) DEFAULT '0',
`realmoney` decimal(10,2) DEFAULT '0.00',
`charge` decimal(10,2) DEFAULT '0.00',
`deductionmoney` decimal(10,2) DEFAULT '0.00',
`beginmoney` decimal(10,2) DEFAULT '0.00',
`endmoney` decimal(10,2) DEFAULT '0.00',
`alipay` varchar(50) NOT NULL DEFAULT '',
`bankname` varchar(50) NOT NULL DEFAULT '',
`bankcard` varchar(50) NOT NULL DEFAULT '',
`realname` varchar(50) NOT NULL DEFAULT '',
`alipay1` varchar(50) NOT NULL DEFAULT '',
`bankname1` varchar(50) NOT NULL DEFAULT '',
`bankcard1` varchar(50) NOT NULL DEFAULT '',
`repurchase` decimal(10,2) DEFAULT '0.00',
`sendmoney` decimal(10,2) DEFAULT '0.00',
`senddata` text,
`bankopen` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_mid` (`mid`),
KEY `idx_checktime` (`checktime`),
KEY `idx_paytime` (`paytime`),
KEY `idx_applytime` (`applytime`),
KEY `idx_status` (`status`),
KEY `idx_invalidtime` (`invalidtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_bank` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`bankname` varchar(255) NOT NULL DEFAULT '',
`content` varchar(255) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_clickcount` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`from_openid` varchar(255) DEFAULT '',
`clicktime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_from_openid` (`from_openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_level` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`levelname` varchar(50) DEFAULT '',
`commission1` decimal(10,2) DEFAULT '0.00',
`commission2` decimal(10,2) DEFAULT '0.00',
`commission3` decimal(10,2) DEFAULT '0.00',
`commissionmoney` decimal(10,2) DEFAULT '0.00',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`downcount` int(11) DEFAULT '0',
`ordercount` int(11) DEFAULT '0',
`goodsids` varchar(1000) DEFAULT '',
`goodsids_text` varchar(2000) NOT NULL DEFAULT '',
`level` int(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`applyid` int(11) DEFAULT '0',
`mid` int(11) DEFAULT '0',
`commission` decimal(10,2) DEFAULT '0.00',
`createtime` int(11) DEFAULT '0',
`commission_pay` decimal(10,2) DEFAULT '0.00',
`realmoney` decimal(10,2) DEFAULT '0.00',
`charge` decimal(10,2) DEFAULT '0.00',
`deductionmoney` decimal(10,2) DEFAULT '0.00',
`type` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_applyid` (`applyid`),
KEY `idx_mid` (`mid`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_rank` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`type` tinyint(4) NOT NULL DEFAULT '0',
`num` int(11) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`content` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_relation` (
`id` int(10) unsigned NOT NULL,
`pid` int(10) unsigned NOT NULL,
`level` tinyint(1) unsigned NOT NULL,
UNIQUE KEY `id_pid` (`id`,`pid`),
KEY `id` (`id`),
KEY `pid` (`pid`),
KEY `level` (`level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_repurchase` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`year` int(4) DEFAULT '0',
`month` tinyint(2) DEFAULT '0',
`repurchase` decimal(10,2) DEFAULT '0.00',
`applyid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `applyid` (`applyid`),
KEY `openid` (`openid`),
KEY `uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_commission_shop` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`mid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT '',
`logo` varchar(255) DEFAULT '',
`img` varchar(255) DEFAULT NULL,
`desc` varchar(255) DEFAULT '',
`selectgoods` tinyint(3) DEFAULT '0',
`selectcategory` tinyint(3) DEFAULT '0',
`goodsids` text,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_mid` (`mid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`catid` int(11) DEFAULT '0',
`couponname` varchar(255) DEFAULT '',
`gettype` tinyint(3) DEFAULT '0',
`getmax` int(11) DEFAULT '0',
`usetype` tinyint(3) DEFAULT '0' COMMENT '消费方式 0 付款使用 1 下单使用',
`returntype` tinyint(3) DEFAULT '0' COMMENT '退回方式 0 不可退回 1 取消订单(未付款) 2.退款可以退回',
`bgcolor` varchar(255) DEFAULT '',
`enough` decimal(10,2) DEFAULT '0.00',
`timelimit` tinyint(3) DEFAULT '0' COMMENT '0 领取后几天有效 1 时间范围',
`coupontype` tinyint(3) DEFAULT '0' COMMENT '0 优惠券 1 充值券',
`timedays` int(11) DEFAULT '0',
`timestart` int(11) DEFAULT '0',
`timeend` int(11) DEFAULT '0',
`discount` decimal(10,2) DEFAULT '0.00' COMMENT '折扣',
`deduct` decimal(10,2) DEFAULT '0.00' COMMENT '抵扣',
`backtype` tinyint(3) DEFAULT '0',
`backmoney` varchar(50) DEFAULT '' COMMENT '返现',
`backcredit` varchar(50) DEFAULT '' COMMENT '返积分',
`backredpack` varchar(50) DEFAULT '',
`backwhen` tinyint(3) DEFAULT '0',
`thumb` varchar(255) DEFAULT '',
`desc` text,
`createtime` int(11) DEFAULT '0',
`total` int(11) DEFAULT '0' COMMENT '数量 -1 不限制',
`status` tinyint(3) DEFAULT '0' COMMENT '可用',
`money` decimal(10,2) DEFAULT '0.00' COMMENT '购买价格',
`respdesc` text COMMENT '推送描述',
`respthumb` varchar(255) DEFAULT '' COMMENT '推送图片',
`resptitle` varchar(255) DEFAULT '' COMMENT '推送标题',
`respurl` varchar(255) DEFAULT '',
`credit` int(11) DEFAULT '0',
`usecredit2` tinyint(3) DEFAULT '0',
`remark` varchar(1000) DEFAULT '',
`descnoset` tinyint(3) DEFAULT '0',
`pwdkey` varchar(255) DEFAULT '',
`pwdsuc` text,
`pwdfail` text,
`pwdurl` varchar(255) DEFAULT '',
`pwdask` text,
`pwdstatus` tinyint(3) DEFAULT '0',
`pwdtimes` int(11) DEFAULT '0',
`pwdfull` text,
`pwdwords` text,
`pwdopen` tinyint(3) DEFAULT '0',
`pwdown` text,
`pwdexit` varchar(255) DEFAULT '',
`pwdexitstr` text,
`displayorder` int(11) DEFAULT '0',
`pwdkey2` varchar(255) DEFAULT '',
`merchid` int(11) DEFAULT '0',
`limitgoodtype` tinyint(1) DEFAULT '0',
`limitgoodcatetype` tinyint(1) DEFAULT '0',
`limitgoodcateids` varchar(500) DEFAULT '',
`limitgoodids` varchar(500) DEFAULT '',
`islimitlevel` tinyint(1) DEFAULT '0',
`limitmemberlevels` varchar(500) DEFAULT '',
`limitagentlevels` varchar(500) DEFAULT '',
`limitpartnerlevels` varchar(500) DEFAULT '',
`limitaagentlevels` varchar(500) DEFAULT '',
`tagtitle` varchar(20) DEFAULT '',
`settitlecolor` tinyint(1) DEFAULT '0',
`titlecolor` varchar(10) DEFAULT '',
`limitdiscounttype` tinyint(1) DEFAULT '1',
`quickget` tinyint(1) DEFAULT '0',
`templateid` varchar(60) DEFAULT '0',
`isfriendcoupon` int(11) DEFAULT '0',
`url_limit` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_coupontype` (`coupontype`),
KEY `idx_timestart` (`timestart`),
KEY `idx_timeend` (`timeend`),
KEY `idx_timelimit` (`timelimit`),
KEY `idx_status` (`status`),
KEY `idx_givetype` (`backtype`),
KEY `idx_catid` (`catid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`status` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`couponid` int(11) DEFAULT '0',
`gettype` tinyint(3) DEFAULT '0' COMMENT '获取方式 0 发放 1 领取 2 积分商城',
`used` int(11) DEFAULT '0',
`usetime` int(11) DEFAULT '0',
`gettime` int(11) DEFAULT '0' COMMENT '获取时间',
`senduid` int(11) DEFAULT '0',
`ordersn` varchar(255) DEFAULT '',
`back` tinyint(3) DEFAULT '0',
`backtime` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`isnew` tinyint(1) DEFAULT '1',
`nocount` tinyint(1) DEFAULT '1',
`shareident` varchar(50) DEFAULT NULL,
`textkey` int(11) DEFAULT NULL,
`friendcouponid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_couponid` (`couponid`),
KEY `idx_gettype` (`gettype`),
KEY `idx_used` (`used`),
KEY `idx_gettime` (`gettime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_goodsendtask` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`goodsid` int(11) DEFAULT '0',
`couponid` int(11) DEFAULT '0',
`starttime` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`sendnum` int(11) DEFAULT '1',
`num` int(11) DEFAULT '0',
`sendpoint` tinyint(1) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_guess` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`couponid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`times` int(11) DEFAULT '0',
`pwdkey` varchar(255) DEFAULT '',
`ok` tinyint(3) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_couponid` (`couponid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`logno` varchar(255) DEFAULT '',
`openid` varchar(255) DEFAULT '',
`couponid` int(11) DEFAULT '0',
`status` int(11) DEFAULT '0',
`paystatus` tinyint(3) DEFAULT '0',
`creditstatus` tinyint(3) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`paytype` tinyint(3) DEFAULT '0',
`getfrom` tinyint(3) DEFAULT '0' COMMENT '0 发放 1 中心 2 积分兑换',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_couponid` (`couponid`),
KEY `idx_status` (`status`),
KEY `idx_paystatus` (`paystatus`),
KEY `idx_createtime` (`createtime`),
KEY `idx_getfrom` (`getfrom`),
KEY `idx_logno` (`logno`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`coupon_id` int(11) NOT NULL,
`openid` varchar(60) NOT NULL,
`mid` int(11) NOT NULL,
`record_id` int(11) NOT NULL,
`add_time` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `coupon_id` (`coupon_id`),
KEY `coupon_id_2` (`coupon_id`),
KEY `record_id` (`record_id`),
KEY `add_time` (`add_time`),
KEY `openid` (`openid`),
KEY `openid_2` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_sendshow` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`showkey` varchar(20) NOT NULL,
`uniacid` int(11) NOT NULL,
`openid` varchar(255) NOT NULL,
`coupondataid` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_sendtasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`enough` decimal(10,2) DEFAULT '0.00',
`couponid` int(11) DEFAULT '0',
`starttime` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`sendnum` int(11) DEFAULT '1',
`num` int(11) DEFAULT '0',
`sendpoint` tinyint(1) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_taskdata` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`openid` varchar(50) DEFAULT NULL,
`taskid` int(11) DEFAULT '0',
`couponid` int(11) DEFAULT '0',
`sendnum` int(11) DEFAULT '0',
`tasktype` tinyint(1) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`parentorderid` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`sendpoint` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_coupon_usesendtasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`usecouponid` int(11) DEFAULT '0',
`couponid` int(11) DEFAULT '0',
`starttime` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`sendnum` int(11) DEFAULT '1',
`num` int(11) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0' COMMENT '所属帐号',
`name` varchar(50) DEFAULT NULL COMMENT '分类名称',
`thumb` varchar(255) DEFAULT NULL COMMENT '分类图片',
`displayorder` tinyint(3) unsigned DEFAULT '0' COMMENT '排序',
`enabled` tinyint(1) DEFAULT '1' COMMENT '是否开启',
`advimg` varchar(255) DEFAULT '',
`advurl` varchar(500) DEFAULT '',
`isrecommand` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_enabled` (`enabled`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`logid` int(11) NOT NULL DEFAULT '0',
`logno` varchar(50) NOT NULL DEFAULT '',
`goodsid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(50) DEFAULT NULL,
`nickname` varchar(50) DEFAULT NULL,
`headimg` varchar(255) DEFAULT NULL,
`level` tinyint(3) NOT NULL DEFAULT '0',
`content` varchar(255) DEFAULT NULL,
`images` text,
`time` int(11) NOT NULL DEFAULT '0',
`reply_content` varchar(255) DEFAULT NULL,
`reply_images` text,
`reply_time` int(11) NOT NULL DEFAULT '0',
`append_content` varchar(255) DEFAULT NULL,
`append_images` text,
`append_time` int(11) NOT NULL DEFAULT '0',
`append_reply_content` varchar(255) DEFAULT NULL,
`append_reply_images` text,
`append_reply_time` int(11) NOT NULL DEFAULT '0',
`istop` tinyint(3) NOT NULL DEFAULT '0',
`checked` tinyint(3) NOT NULL DEFAULT '0',
`append_checked` tinyint(3) NOT NULL DEFAULT '0',
`virtual` tinyint(3) NOT NULL DEFAULT '0',
`deleted` tinyint(3) NOT NULL DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`cate` int(11) DEFAULT '0',
`thumb` varchar(255) DEFAULT '',
`price` decimal(10,2) DEFAULT '0.00',
`type` tinyint(3) DEFAULT '0',
`credit` int(11) DEFAULT '0',
`money` decimal(10,2) DEFAULT '0.00',
`total` int(11) DEFAULT '0',
`totalday` int(11) DEFAULT '0',
`chance` int(11) DEFAULT '0',
`chanceday` int(11) DEFAULT '0',
`detail` text,
`rate1` int(11) DEFAULT '0',
`rate2` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`joins` int(11) DEFAULT '0',
`views` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
`showlevels` text,
`buylevels` text,
`showgroups` text,
`buygroups` text,
`vip` tinyint(3) DEFAULT '0',
`istop` tinyint(3) DEFAULT '0',
`isrecommand` tinyint(3) DEFAULT '0',
`istime` tinyint(3) DEFAULT '0',
`timestart` int(11) DEFAULT '0',
`timeend` int(11) DEFAULT '0',
`share_title` varchar(255) DEFAULT '',
`share_icon` varchar(255) DEFAULT '',
`share_desc` varchar(500) DEFAULT '',
`followneed` tinyint(3) DEFAULT '0',
`followtext` varchar(255) DEFAULT '',
`subtitle` varchar(255) DEFAULT '',
`subdetail` text,
`noticedetail` text,
`usedetail` varchar(255) DEFAULT '',
`goodsdetail` text,
`isendtime` tinyint(3) DEFAULT '0',
`usecredit2` tinyint(3) DEFAULT '0',
`area` varchar(255) DEFAULT '',
`dispatch` decimal(10,2) DEFAULT '0.00',
`storeids` text,
`noticeopenid` varchar(255) DEFAULT '',
`noticetype` tinyint(3) DEFAULT '0',
`isverify` tinyint(3) DEFAULT '0',
`goodstype` tinyint(3) DEFAULT '0',
`couponid` int(11) DEFAULT '0',
`goodsid` int(11) DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
`productprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`mincredit` decimal(10,2) NOT NULL DEFAULT '0.00',
`minmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`maxcredit` decimal(10,2) NOT NULL DEFAULT '0.00',
`maxmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`dispatchtype` tinyint(3) NOT NULL DEFAULT '0',
`dispatchid` int(11) NOT NULL DEFAULT '0',
`verifytype` tinyint(3) NOT NULL DEFAULT '0',
`verifynum` int(11) NOT NULL DEFAULT '0',
`grant1` decimal(10,2) NOT NULL DEFAULT '0.00',
`grant2` decimal(10,2) NOT NULL DEFAULT '0.00',
`goodssn` varchar(255) NOT NULL,
`productsn` varchar(255) NOT NULL,
`weight` int(11) NOT NULL,
`showtotal` tinyint(3) NOT NULL,
`totalcnf` tinyint(3) NOT NULL DEFAULT '0',
`usetime` int(11) NOT NULL DEFAULT '0',
`hasoption` tinyint(3) NOT NULL DEFAULT '0',
`noticedetailshow` tinyint(3) NOT NULL DEFAULT '0',
`detailshow` tinyint(3) NOT NULL DEFAULT '0',
`packetmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`surplusmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`packetlimit` decimal(10,2) NOT NULL DEFAULT '0.00',
`packettype` tinyint(3) NOT NULL DEFAULT '0',
`minpacketmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`packettotal` int(11) NOT NULL DEFAULT '0',
`packetsurplus` int(11) NOT NULL DEFAULT '0',
`maxpacketmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`ccates` text,
`pcates` text,
`tcates` text,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`),
KEY `idx_endtime` (`endtime`),
KEY `idx_createtime` (`createtime`),
KEY `idx_status` (`status`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_deleted` (`deleted`),
KEY `idx_istop` (`istop`),
KEY `idx_isrecommand` (`isrecommand`),
KEY `idx_istime` (`istime`),
KEY `idx_timestart` (`timestart`),
KEY `idx_timeend` (`timeend`),
KEY `idx_goodstype` (`goodstype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`logno` varchar(255) DEFAULT '',
`eno` varchar(255) DEFAULT '' COMMENT '兑换码',
`openid` varchar(255) DEFAULT '',
`goodsid` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0' COMMENT '0 只生成记录未参加 1 未中奖 2 已中奖 3 已发奖',
`paystatus` tinyint(3) DEFAULT '0' COMMENT '支付状态 -1 不需要支付 0 未支付 1 已支付',
`paytype` tinyint(3) DEFAULT '-1' COMMENT '支付类型 -1 不需要支付 0 余额 1 微信',
`dispatchstatus` tinyint(3) DEFAULT '0' COMMENT '运费状态 -1 不需要运费 0 未支付 1 已支付',
`creditpay` tinyint(3) DEFAULT '0' COMMENT '积分支付 0 未支付 1 已支付',
`addressid` int(11) DEFAULT '0' COMMENT '收货地址',
`dispatchno` varchar(255) DEFAULT '' COMMENT '运费支付单号',
`usetime` int(11) DEFAULT '0',
`express` varchar(255) DEFAULT '',
`expresssn` varchar(255) DEFAULT '',
`expresscom` varchar(255) DEFAULT '',
`verifyopenid` varchar(255) DEFAULT '',
`storeid` int(11) DEFAULT '0',
`realname` varchar(255) DEFAULT '',
`mobile` varchar(255) DEFAULT '',
`couponid` int(11) DEFAULT '0',
`dupdate1` tinyint(3) DEFAULT '0',
`transid` varchar(255) DEFAULT '',
`dispatchtransid` varchar(255) DEFAULT '',
`address` text,
`optionid` int(11) NOT NULL DEFAULT '0',
`time_send` int(11) NOT NULL DEFAULT '0',
`time_finish` int(11) NOT NULL DEFAULT '0',
`iscomment` tinyint(3) NOT NULL DEFAULT '0',
`dispatchtime` int(11) NOT NULL DEFAULT '0',
`verifynum` int(11) NOT NULL DEFAULT '1',
`verifytime` int(11) NOT NULL DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
`remarksaler` text,
`dispatch` decimal(10,2) DEFAULT '0.00',
`money` decimal(10,2) DEFAULT '0.00',
`credit` int(11) DEFAULT '0',
`goods_num` int(11) DEFAULT '0',
`merchapply` tinyint(4) NOT NULL DEFAULT '0',
`pay_time` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_option` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`goodsid` int(10) DEFAULT '0',
`title` varchar(50) DEFAULT '',
`thumb` varchar(60) DEFAULT '',
`credit` int(10) NOT NULL DEFAULT '0',
`money` decimal(10,2) DEFAULT '0.00',
`total` int(11) DEFAULT '0',
`weight` decimal(10,2) DEFAULT '0.00',
`displayorder` int(11) DEFAULT '0',
`specs` text,
`skuId` varchar(255) DEFAULT '',
`goodssn` varchar(255) DEFAULT '',
`productsn` varchar(255) DEFAULT '',
`virtual` int(11) DEFAULT '0',
`exchange_stock` int(11) NOT NULL DEFAULT '-1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_spec` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`goodsid` int(11) DEFAULT '0',
`title` varchar(50) DEFAULT '',
`description` varchar(1000) DEFAULT '',
`displaytype` tinyint(3) DEFAULT '0',
`content` text,
`displayorder` int(11) DEFAULT '0',
`propId` varchar(255) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_spec_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`specid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`show` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`valueId` varchar(255) DEFAULT '',
`virtual` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_creditshop_verify` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(45) DEFAULT '0',
`logid` int(11) DEFAULT '0',
`verifycode` varchar(45) DEFAULT NULL,
`storeid` int(11) DEFAULT '0',
`verifier` varchar(45) DEFAULT '0',
`isverify` tinyint(3) DEFAULT '0',
`verifytime` int(11) DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_customer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`kf_id` varchar(255) DEFAULT NULL,
`kf_account` varchar(255) DEFAULT '',
`kf_nick` varchar(255) DEFAULT '',
`kf_pwd` varchar(255) DEFAULT '',
`kf_headimgurl` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_customer_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_customer_guestbook` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`realname` varchar(11) DEFAULT '',
`mobile` varchar(255) DEFAULT '',
`weixin` varchar(255) DEFAULT '',
`images` text,
`content` text,
`remark` text,
`status` tinyint(3) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_customer_robot` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cate` int(11) DEFAULT '0',
`keywords` varchar(500) DEFAULT '',
`title` varchar(255) DEFAULT '',
`content` longtext,
`url` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_cate` (`cate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_cycelbuy_periods` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`orderid` int(11) NOT NULL,
`cycelsn` varchar(255) NOT NULL,
`sendtime` int(11) DEFAULT NULL,
`receipttime` int(11) DEFAULT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
`remark` varchar(255) DEFAULT NULL,
`addressid` int(11) DEFAULT NULL,
`dispatchprice` decimal(10,2) DEFAULT NULL,
`dispatchid` int(11) DEFAULT NULL,
`createtime` int(11) DEFAULT NULL,
`dispatchtype` tinyint(3) DEFAULT NULL,
`finishtime` int(11) DEFAULT NULL,
`expresscom` varchar(255) DEFAULT NULL,
`expresssn` varchar(255) DEFAULT NULL,
`express` varchar(255) DEFAULT NULL,
`address` text,
`updatelog` text,
`ispostpone` tinyint(4) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_datatransfer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`fromuniacid` int(11) DEFAULT NULL,
`touniacid` int(11) DEFAULT NULL,
`status` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_designer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0' COMMENT '公众号',
`pagename` varchar(255) NOT NULL DEFAULT '' COMMENT '页面名称',
`pagetype` tinyint(3) NOT NULL DEFAULT '0' COMMENT '页面类型',
`pageinfo` text NOT NULL,
`createtime` varchar(255) NOT NULL DEFAULT '' COMMENT '页面创建时间',
`keyword` varchar(255) DEFAULT '',
`savetime` varchar(255) NOT NULL DEFAULT '' COMMENT '页面最后保存时间',
`setdefault` tinyint(3) NOT NULL DEFAULT '0' COMMENT '默认页面',
`datas` text NOT NULL COMMENT '数据',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_pagetype` (`pagetype`),
KEY `idx_keyword` (`keyword`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_designer_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`menuname` varchar(255) DEFAULT '',
`isdefault` tinyint(3) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`menus` text,
`params` text,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_isdefault` (`isdefault`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_dispatch` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`dispatchname` varchar(50) DEFAULT '',
`dispatchtype` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`firstprice` decimal(10,2) DEFAULT '0.00',
`secondprice` decimal(10,2) DEFAULT '0.00',
`firstweight` int(11) DEFAULT '0',
`secondweight` int(11) DEFAULT '0',
`express` varchar(250) DEFAULT '',
`areas` longtext,
`carriers` text,
`enabled` int(11) DEFAULT '0',
`calculatetype` tinyint(1) DEFAULT '0',
`firstnum` int(11) DEFAULT '0',
`secondnum` int(11) DEFAULT '0',
`firstnumprice` decimal(10,2) DEFAULT '0.00',
`secondnumprice` decimal(10,2) DEFAULT '0.00',
`isdefault` tinyint(1) DEFAULT '0',
`shopid` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`nodispatchareas` text,
`nodispatchareas_code` longtext,
`isdispatcharea` tinyint(3) NOT NULL DEFAULT '0',
`freeprice` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_dividend_apply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`applyno` varchar(255) DEFAULT '',
`mid` int(11) DEFAULT '0',
`type` tinyint(3) DEFAULT '0',
`orderids` longtext,
`dividend` decimal(10,2) DEFAULT '0.00',
`dividend_pay` decimal(10,2) DEFAULT '0.00',
`content` text,
`status` tinyint(3) DEFAULT '0',
`applytime` int(11) DEFAULT '0',
`checktime` int(11) DEFAULT '0',
`paytime` int(11) DEFAULT '0',
`invalidtime` int(11) DEFAULT '0',
`realmoney` decimal(10,2) DEFAULT '0.00',
`charge` decimal(10,2) DEFAULT '0.00',
`deductionmoney` decimal(10,2) DEFAULT '0.00',
`beginmoney` decimal(10,2) DEFAULT '0.00',
`endmoney` decimal(10,2) DEFAULT '0.00',
`alipay` varchar(50) NOT NULL DEFAULT '',
`bankname` varchar(50) NOT NULL DEFAULT '',
`bankcard` varchar(50) NOT NULL DEFAULT '',
`alipay1` varchar(50) NOT NULL DEFAULT '',
`bankname1` varchar(50) NOT NULL DEFAULT '',
`bankcard1` varchar(50) NOT NULL DEFAULT '',
`realname` varchar(50) NOT NULL DEFAULT '',
`sendmoney` decimal(10,2) DEFAULT '0.00',
`senddata` text,
`bankopen` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_mid` (`mid`),
KEY `idx_checktime` (`checktime`),
KEY `idx_paytime` (`paytime`),
KEY `idx_applytime` (`applytime`),
KEY `idx_status` (`status`),
KEY `idx_invalidtime` (`invalidtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_dividend_bank` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`bankname` varchar(255) NOT NULL DEFAULT '',
`content` varchar(255) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_dividend_init` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`headsid` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_dividend_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`applyid` int(11) DEFAULT '0',
`mid` int(11) DEFAULT '0',
`dividend` decimal(10,2) DEFAULT '0.00',
`createtime` int(11) DEFAULT '0',
`dividend_pay` decimal(10,2) DEFAULT '0.00',
`realmoney` decimal(10,2) DEFAULT '0.00',
`charge` decimal(10,2) DEFAULT '0.00',
`deductionmoney` decimal(10,2) DEFAULT '0.00',
`type` tinyint(3) DEFAULT '0',
`type1` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_applyid` (`applyid`),
KEY `idx_mid` (`mid`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diyform_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diyform_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`typeid` int(11) NOT NULL DEFAULT '0',
`cid` int(11) DEFAULT '0',
`diyformfields` text,
`fields` text NOT NULL,
`openid` varchar(255) NOT NULL DEFAULT '',
`type` tinyint(2) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_typeid` (`typeid`),
KEY `idx_cid` (`cid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diyform_temp` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`typeid` int(11) DEFAULT '0',
`cid` int(11) NOT NULL DEFAULT '0',
`diyformfields` text,
`fields` text NOT NULL,
`openid` varchar(255) NOT NULL DEFAULT '',
`type` tinyint(1) DEFAULT '0',
`diyformid` int(11) DEFAULT '0',
`diyformdata` text,
`carrier_realname` varchar(255) DEFAULT '',
`carrier_mobile` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_cid` (`cid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diyform_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`cate` int(11) DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`fields` text NOT NULL,
`usedata` int(11) NOT NULL DEFAULT '0',
`alldata` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) DEFAULT '1',
`savedata` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_cate` (`cate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diypage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`type` tinyint(1) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`data` longtext NOT NULL,
`createtime` int(11) NOT NULL DEFAULT '0',
`lastedittime` int(11) NOT NULL DEFAULT '0',
`keyword` varchar(255) NOT NULL DEFAULT '',
`diymenu` int(11) NOT NULL DEFAULT '0',
`merch` int(11) NOT NULL DEFAULT '0',
`diyadv` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`),
KEY `idx_keyword` (`keyword`),
KEY `idx_lastedittime` (`lastedittime`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diypage_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`data` text NOT NULL,
`createtime` int(11) NOT NULL DEFAULT '0',
`lastedittime` int(11) NOT NULL DEFAULT '0',
`merch` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_lastedittime` (`lastedittime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diypage_plu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`data` text NOT NULL,
`createtime` int(11) NOT NULL DEFAULT '0',
`lastedittime` int(11) NOT NULL DEFAULT '0',
`merch` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_lastedittime` (`lastedittime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diypage_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`type` tinyint(3) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`data` longtext NOT NULL,
`preview` varchar(255) NOT NULL DEFAULT '',
`tplid` int(11) DEFAULT '0',
`cate` int(11) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
`merch` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`),
KEY `idx_cate` (`cate`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_diypage_template_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`merch` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_domain_bindings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`domain` varchar(255) DEFAULT NULL,
`plugin` varchar(255) DEFAULT NULL,
`mobile_domain` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exchange_cart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`openid` varchar(100) DEFAULT NULL,
`goodsid` int(11) DEFAULT NULL,
`total` int(10) DEFAULT '1',
`marketprice` decimal(10,2) DEFAULT NULL,
`optionid` int(11) DEFAULT NULL,
`selected` tinyint(1) DEFAULT '1',
`deleted` tinyint(1) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT NULL,
`groupid` int(11) DEFAULT NULL,
`serial` varchar(255) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exchange_code` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`groupid` int(11) NOT NULL DEFAULT '0',
`uniacid` int(11) NOT NULL DEFAULT '0',
`endtime` datetime NOT NULL DEFAULT '2016-10-01 00:00:00',
`status` int(2) NOT NULL DEFAULT '1',
`openid` varchar(255) NOT NULL DEFAULT '',
`count` int(11) NOT NULL DEFAULT '0',
`key` varchar(255) NOT NULL DEFAULT '',
`type` int(11) NOT NULL DEFAULT '0',
`scene` int(11) NOT NULL DEFAULT '0',
`qrcode_url` varchar(255) NOT NULL DEFAULT '',
`serial` varchar(255) NOT NULL DEFAULT '',
`balancestatus` int(11) DEFAULT '1',
`redstatus` int(11) DEFAULT '1',
`scorestatus` int(11) DEFAULT '1',
`couponstatus` int(11) DEFAULT '1',
`goodsstatus` int(11) DEFAULT NULL,
`repeatcount` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`,`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exchange_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`type` int(2) NOT NULL DEFAULT '0',
`endtime` datetime NOT NULL DEFAULT '2016-10-01 00:00:00',
`mode` int(2) NOT NULL DEFAULT '0',
`status` int(2) NOT NULL DEFAULT '0',
`max` int(2) NOT NULL DEFAULT '0',
`value` decimal(10,2) NOT NULL DEFAULT '0.00',
`uniacid` int(11) NOT NULL DEFAULT '0',
`starttime` datetime NOT NULL DEFAULT '2016-10-01 00:00:00',
`goods` text,
`score` int(11) NOT NULL DEFAULT '0',
`coupon` text,
`use` int(11) NOT NULL DEFAULT '0',
`total` int(11) NOT NULL DEFAULT '0',
`red` decimal(10,2) NOT NULL DEFAULT '0.00',
`balance` decimal(10,2) NOT NULL DEFAULT '0.00',
`balance_left` decimal(10,2) NOT NULL DEFAULT '0.00',
`balance_right` decimal(10,2) NOT NULL DEFAULT '0.00',
`red_left` decimal(10,2) NOT NULL DEFAULT '0.00',
`red_right` decimal(10,2) NOT NULL DEFAULT '0.00',
`score_left` int(11) NOT NULL DEFAULT '0',
`score_right` int(11) NOT NULL DEFAULT '0',
`balance_type` int(11) NOT NULL,
`red_type` int(11) NOT NULL,
`score_type` int(11) NOT NULL,
`title_reply` varchar(255) NOT NULL DEFAULT '',
`img` varchar(255) NOT NULL DEFAULT '',
`content` varchar(255) NOT NULL DEFAULT '',
`rule` text NOT NULL,
`coupon_type` varchar(255) DEFAULT NULL,
`basic_content` varchar(500) NOT NULL DEFAULT '',
`reply_type` int(11) NOT NULL DEFAULT '0',
`code_type` int(11) NOT NULL DEFAULT '0',
`binding` int(11) NOT NULL DEFAULT '0',
`showcount` int(11) DEFAULT '0',
`postage` decimal(10,2) DEFAULT '0.00',
`postage_type` int(11) DEFAULT '0',
`banner` varchar(800) DEFAULT '',
`keyword_reply` int(11) DEFAULT '0',
`reply_status` int(11) DEFAULT '1',
`reply_keyword` varchar(255) DEFAULT '',
`input_banner` varchar(255) DEFAULT '',
`diypage` int(11) NOT NULL DEFAULT '0',
`sendname` varchar(255) DEFAULT '',
`wishing` varchar(255) DEFAULT '',
`actname` varchar(255) DEFAULT '',
`remark` varchar(255) DEFAULT '',
`repeat` int(11) NOT NULL DEFAULT '0',
`koulingstart` varchar(255) NOT NULL DEFAULT '',
`koulingend` varchar(255) NOT NULL DEFAULT '',
`kouling` tinyint(1) NOT NULL DEFAULT '0',
`chufa` varchar(255) NOT NULL DEFAULT '',
`chufaend` varchar(255) NOT NULL DEFAULT '',
`goods_native` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exchange_query` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(255) NOT NULL DEFAULT '',
`querykey` varchar(255) NOT NULL DEFAULT '',
`querytime` int(11) NOT NULL DEFAULT '0',
`unfreeze` int(11) NOT NULL DEFAULT '0',
`errorcount` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`,`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exchange_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`key` varchar(255) NOT NULL DEFAULT '',
`uniacid` int(11) DEFAULT NULL,
`goods` text,
`orderid` varchar(255) NOT NULL DEFAULT '',
`time` int(11) NOT NULL,
`openid` varchar(255) NOT NULL DEFAULT '',
`mode` int(11) NOT NULL DEFAULT '0',
`balance` decimal(10,2) DEFAULT '0.00',
`red` decimal(10,2) NOT NULL DEFAULT '0.00',
`coupon` text,
`score` int(11) NOT NULL DEFAULT '0',
`nickname` varchar(255) NOT NULL DEFAULT '',
`groupid` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`serial` varchar(255) NOT NULL DEFAULT '',
`ordersn` varchar(255) NOT NULL DEFAULT '',
`goods_title` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`,`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exchange_setting` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`freeze` int(11) NOT NULL DEFAULT '0',
`mistake` int(11) NOT NULL DEFAULT '0',
`grouplimit` int(11) NOT NULL DEFAULT '0',
`alllimit` int(11) NOT NULL DEFAULT '0',
`no_qrimg` tinyint(3) NOT NULL DEFAULT '1',
`rule` text,
`coupon_templateid` varchar(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`,`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exhelper_esheet` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT '',
`express` varchar(50) DEFAULT '',
`code` varchar(20) NOT NULL DEFAULT '',
`datas` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exhelper_esheet_temp` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`esheetid` int(11) NOT NULL DEFAULT '0',
`esheetname` varchar(255) NOT NULL DEFAULT '',
`customername` varchar(50) NOT NULL DEFAULT '',
`customerpwd` varchar(50) NOT NULL DEFAULT '',
`monthcode` varchar(50) NOT NULL DEFAULT '',
`sendsite` varchar(50) NOT NULL DEFAULT '',
`paytype` tinyint(3) NOT NULL DEFAULT '1',
`templatesize` varchar(10) NOT NULL DEFAULT '',
`isnotice` tinyint(3) NOT NULL DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
`issend` tinyint(3) NOT NULL DEFAULT '1',
`isdefault` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_isdefault` (`isdefault`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exhelper_express` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`type` int(1) NOT NULL DEFAULT '1',
`expressname` varchar(255) DEFAULT '',
`expresscom` varchar(255) NOT NULL DEFAULT '',
`express` varchar(255) NOT NULL DEFAULT '',
`width` decimal(10,2) DEFAULT '0.00',
`datas` text,
`height` decimal(10,2) DEFAULT '0.00',
`bg` varchar(255) DEFAULT '',
`isdefault` tinyint(3) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_isdefault` (`isdefault`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exhelper_senduser` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`sendername` varchar(255) DEFAULT '',
`sendertel` varchar(255) DEFAULT '',
`sendersign` varchar(255) DEFAULT '',
`sendercode` int(11) DEFAULT NULL,
`senderaddress` varchar(255) DEFAULT '',
`sendercity` varchar(255) DEFAULT NULL,
`isdefault` tinyint(3) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`province` varchar(30) NOT NULL DEFAULT '',
`city` varchar(30) NOT NULL DEFAULT '',
`area` varchar(30) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_isdefault` (`isdefault`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_exhelper_sys` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`ip` varchar(20) NOT NULL DEFAULT 'localhost',
`ip_cloud` varchar(255) NOT NULL DEFAULT '',
`port` int(11) NOT NULL DEFAULT '8000',
`port_cloud` int(11) NOT NULL DEFAULT '8000',
`is_cloud` int(1) NOT NULL DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`ebusiness` varchar(20) NOT NULL DEFAULT '',
`apikey` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_express` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT '',
`express` varchar(50) DEFAULT '',
`status` tinyint(1) DEFAULT '1',
`displayorder` tinyint(3) unsigned DEFAULT '0',
`code` varchar(30) NOT NULL DEFAULT '',
`coding` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_express_cache` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`expresssn` varchar(50) DEFAULT NULL,
`express` varchar(50) DEFAULT NULL,
`lasttime` int(11) NOT NULL,
`datas` text,
PRIMARY KEY (`id`),
KEY `idx_expresssn` (`expresssn`),
KEY `idx_express` (`express`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_feedback` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '0',
`type` tinyint(1) DEFAULT '1' COMMENT '1为维权2为投诉',
`status` tinyint(1) DEFAULT '0' COMMENT '状态 0 未解决1用户同意2用户拒绝',
`feedbackid` varchar(100) DEFAULT '' COMMENT '投诉单号',
`transid` varchar(100) DEFAULT '' COMMENT '订单号',
`reason` varchar(1000) DEFAULT '' COMMENT '理由',
`solution` varchar(1000) DEFAULT '' COMMENT '期待解决方案',
`remark` varchar(1000) DEFAULT '' COMMENT '备注',
`createtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_feedbackid` (`feedbackid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_transid` (`transid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_form` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`isrequire` tinyint(3) DEFAULT '0',
`key` varchar(255) DEFAULT '',
`title` varchar(255) DEFAULT '',
`type` varchar(255) DEFAULT '',
`values` text,
`cate` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_form_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_friendcoupon` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`title` varchar(255) DEFAULT '',
`people_count` int(10) DEFAULT '0',
`coupon_money` decimal(10,2) DEFAULT '0.00',
`use_condition` decimal(10,2) DEFAULT NULL,
`duration` int(11) DEFAULT '0',
`allocate` tinyint(2) unsigned DEFAULT '0',
`upper_limit` decimal(10,2) DEFAULT '0.00',
`launches_limit` int(11) DEFAULT '0',
`launches_count` int(11) DEFAULT '0',
`activity_start_time` int(11) DEFAULT '0',
`activity_end_time` int(11) DEFAULT '0',
`desc` text,
`use_time_limit` int(11) DEFAULT '0',
`use_start_time` int(11) DEFAULT '0',
`use_end_time` int(11) DEFAULT '0',
`limitdiscounttype` tinyint(1) DEFAULT '0',
`limitgoodcatetype` tinyint(1) DEFAULT '0',
`limitgoodcateids` varchar(500) DEFAULT '',
`limitgoodtype` tinyint(1) unsigned DEFAULT '0',
`limitgoodids` varchar(500) DEFAULT '',
`use_valid_days` int(11) DEFAULT '0',
`status` tinyint(1) DEFAULT NULL,
`displayorder` int(11) DEFAULT '0',
`deleted` tinyint(1) unsigned DEFAULT '0',
`stop_time` int(11) unsigned DEFAULT '0',
`create_time` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_title` (`title`),
KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_friendcoupon_data` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(255) NOT NULL DEFAULT '',
`headerid` int(11) NOT NULL DEFAULT '0',
`activity_id` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
`enough` decimal(10,2) NOT NULL DEFAULT '0.00',
`deduct` decimal(10,2) NOT NULL DEFAULT '0.00',
`timestart` int(11) NOT NULL DEFAULT '0',
`timeend` int(11) NOT NULL DEFAULT '0',
`avatar` varchar(255) NOT NULL DEFAULT '',
`nickname` varchar(255) NOT NULL DEFAULT '',
`receive_time` int(11) NOT NULL DEFAULT '0',
`deadline` int(11) NOT NULL DEFAULT '0',
`is_send` tinyint(1) unsigned NOT NULL DEFAULT '0',
`send_failed_message` tinyint(1) NOT NULL DEFAULT '0',
`form_id` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_headerid` (`headerid`),
KEY `idx_activity_id` (`activity_id`),
KEY `idx_send_failed_message` (`send_failed_message`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_fullback_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`type` tinyint(3) NOT NULL DEFAULT '0',
`goodsid` int(11) NOT NULL DEFAULT '0',
`titles` varchar(255) NOT NULL,
`thumb` varchar(255) NOT NULL,
`marketprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`minallfullbackallprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`maxallfullbackallprice` decimal(10,2) NOT NULL,
`minallfullbackallratio` decimal(10,2) DEFAULT NULL,
`maxallfullbackallratio` decimal(10,2) DEFAULT NULL,
`day` int(11) NOT NULL DEFAULT '0',
`fullbackprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`fullbackratio` decimal(10,2) DEFAULT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
`hasoption` tinyint(3) NOT NULL DEFAULT '0',
`optionid` text NOT NULL,
`startday` int(11) NOT NULL DEFAULT '0',
`refund` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_fullback_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`openid` varchar(50) NOT NULL,
`orderid` int(11) NOT NULL,
`price` decimal(10,2) NOT NULL,
`priceevery` decimal(10,2) NOT NULL,
`day` int(10) NOT NULL,
`fullbackday` int(10) NOT NULL,
`createtime` int(10) NOT NULL,
`fullbacktime` int(10) NOT NULL,
`isfullback` tinyint(3) NOT NULL DEFAULT '0',
`goodsid` int(11) NOT NULL DEFAULT '0',
`optionid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_fullback_log_map` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`fullback_time` int(11) NOT NULL DEFAULT '0',
`logid` int(11) NOT NULL DEFAULT '0',
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`goodsid` int(11) NOT NULL DEFAULT '0',
`optionid` int(11) NOT NULL DEFAULT '0',
`day` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_funbar` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0',
`datas` text,
`uniacid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_gift` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL,
`thumb` varchar(255) NOT NULL,
`activity` tinyint(3) NOT NULL DEFAULT '1',
`orderprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`goodsid` varchar(255) NOT NULL,
`giftgoodsid` varchar(255) NOT NULL,
`starttime` int(11) NOT NULL DEFAULT '0',
`endtime` int(11) NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
`share_title` varchar(255) NOT NULL,
`share_icon` varchar(255) NOT NULL,
`share_desc` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_globonus_bill` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billno` varchar(100) DEFAULT '',
`paytype` int(11) DEFAULT '0',
`year` int(11) DEFAULT '0',
`month` int(11) DEFAULT '0',
`week` int(11) DEFAULT '0',
`ordercount` int(11) DEFAULT '0',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`bonusmoney` decimal(10,2) DEFAULT '0.00',
`bonusmoney_send` decimal(10,2) DEFAULT '0.00',
`bonusmoney_pay` decimal(10,2) DEFAULT '0.00',
`paytime` int(11) DEFAULT '0',
`partnercount` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`starttime` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`confirmtime` int(11) DEFAULT '0',
`bonusordermoney` decimal(10,2) DEFAULT '0.00',
`bonusrate` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_paytype` (`paytype`),
KEY `idx_createtime` (`createtime`),
KEY `idx_paytime` (`paytime`),
KEY `idx_status` (`status`),
KEY `idx_month` (`month`),
KEY `idx_week` (`week`),
KEY `idx_year` (`year`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_globonus_billo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billid` int(11) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`ordermoney` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_billid` (`billid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_globonus_billp` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`billid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`payno` varchar(255) DEFAULT '',
`paytype` tinyint(3) DEFAULT '0',
`bonus` decimal(10,2) DEFAULT '0.00',
`money` decimal(10,2) DEFAULT '0.00',
`realmoney` decimal(10,2) DEFAULT '0.00',
`paymoney` decimal(10,2) DEFAULT '0.00',
`charge` decimal(10,2) DEFAULT '0.00',
`chargemoney` decimal(10,2) DEFAULT '0.00',
`status` tinyint(3) DEFAULT '0',
`reason` varchar(255) DEFAULT '',
`paytime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_billid` (`billid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_globonus_level` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`levelname` varchar(50) DEFAULT '',
`bonus` decimal(10,4) DEFAULT '0.0000',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`ordercount` int(11) DEFAULT '0',
`commissionmoney` decimal(10,2) DEFAULT '0.00',
`bonusmoney` decimal(10,2) DEFAULT '0.00',
`downcount` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`pcate` int(11) DEFAULT '0',
`ccate` int(11) DEFAULT '0',
`type` tinyint(1) DEFAULT '1' COMMENT '1为实体2为虚拟',
`status` tinyint(1) DEFAULT '1',
`displayorder` int(11) DEFAULT '0',
`title` varchar(100) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`unit` varchar(5) DEFAULT '',
`description` varchar(1000) DEFAULT '',
`content` longtext,
`goodssn` varchar(50) DEFAULT '',
`productsn` varchar(50) DEFAULT '',
`productprice` decimal(10,2) DEFAULT '0.00',
`marketprice` decimal(10,2) DEFAULT '0.00',
`costprice` decimal(10,2) DEFAULT '0.00',
`originalprice` decimal(10,2) DEFAULT '0.00' COMMENT '原价',
`total` int(10) DEFAULT '0',
`totalcnf` int(11) DEFAULT '0' COMMENT '0 拍下减库存 1 付款减库存 2 永久不减',
`sales` int(11) DEFAULT '0',
`salesreal` int(11) DEFAULT '0',
`spec` varchar(5000) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`weight` decimal(10,2) DEFAULT '0.00',
`credit` varchar(255) DEFAULT NULL,
`maxbuy` int(11) DEFAULT '0',
`usermaxbuy` int(11) DEFAULT '0',
`hasoption` int(11) DEFAULT '0',
`dispatch` int(11) DEFAULT '0',
`thumb_url` text,
`isnew` tinyint(1) DEFAULT '0',
`ishot` tinyint(1) DEFAULT '0',
`isdiscount` tinyint(1) DEFAULT '0',
`isrecommand` tinyint(1) DEFAULT '0',
`issendfree` tinyint(1) DEFAULT '0',
`istime` tinyint(1) DEFAULT '0',
`iscomment` tinyint(1) DEFAULT '0',
`timestart` int(11) DEFAULT '0',
`timeend` int(11) DEFAULT '0',
`viewcount` int(11) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
`hascommission` tinyint(3) DEFAULT '0',
`commission1_rate` decimal(10,2) DEFAULT '0.00',
`commission1_pay` decimal(10,2) DEFAULT '0.00',
`commission2_rate` decimal(10,2) DEFAULT '0.00',
`commission2_pay` decimal(10,2) DEFAULT '0.00',
`commission3_rate` decimal(10,2) DEFAULT '0.00',
`commission3_pay` decimal(10,2) DEFAULT '0.00',
`score` decimal(10,2) DEFAULT '0.00',
`taobaoid` varchar(255) DEFAULT '',
`taotaoid` varchar(255) DEFAULT '',
`taobaourl` varchar(255) DEFAULT '',
`updatetime` int(11) DEFAULT '0',
`share_title` varchar(255) DEFAULT '',
`share_icon` varchar(255) DEFAULT '',
`cash` tinyint(3) DEFAULT '0',
`commission_thumb` varchar(255) DEFAULT '',
`isnodiscount` tinyint(3) DEFAULT '0',
`showlevels` text,
`buylevels` text,
`showgroups` text,
`buygroups` text,
`isverify` tinyint(3) DEFAULT '0',
`storeids` text,
`noticeopenid` varchar(255) DEFAULT '',
`tcate` int(11) DEFAULT '0',
`noticetype` text,
`needfollow` tinyint(3) DEFAULT '0',
`followtip` varchar(255) DEFAULT '',
`followurl` varchar(255) DEFAULT '',
`deduct` decimal(10,2) DEFAULT '0.00',
`virtual` int(11) DEFAULT '0',
`ccates` text,
`discounts` text,
`nocommission` tinyint(3) DEFAULT '0',
`hidecommission` tinyint(3) DEFAULT '0',
`pcates` text,
`tcates` text,
`artid` int(11) DEFAULT '0',
`detail_logo` varchar(255) DEFAULT '',
`detail_shopname` varchar(255) DEFAULT '',
`detail_btntext1` varchar(255) DEFAULT '',
`detail_btnurl1` varchar(255) DEFAULT '',
`detail_btntext2` varchar(255) DEFAULT '',
`detail_btnurl2` varchar(255) DEFAULT '',
`detail_totaltitle` varchar(255) DEFAULT '',
`deduct2` decimal(10,2) DEFAULT '0.00',
`ednum` int(11) DEFAULT '0',
`edmoney` decimal(10,2) DEFAULT '0.00',
`edareas` text,
`cates` text,
`isdiscount_title` varchar(255) DEFAULT '',
`isdiscount_time` int(11) DEFAULT '0',
`isdiscount_discounts` text,
`commission` text,
`shorttitle` varchar(255) DEFAULT '',
`diyformtype` tinyint(1) DEFAULT '0',
`diyformid` int(11) DEFAULT '0',
`diymode` tinyint(1) DEFAULT '0',
`dispatchtype` tinyint(1) DEFAULT '0',
`dispatchid` int(11) DEFAULT '0',
`dispatchprice` decimal(10,2) DEFAULT '0.00',
`manydeduct` tinyint(1) DEFAULT '0',
`saleupdate37975` tinyint(3) DEFAULT '0',
`shopid` int(11) DEFAULT '0',
`allcates` text,
`minbuy` int(11) DEFAULT '0',
`invoice` tinyint(3) DEFAULT '0',
`repair` tinyint(3) DEFAULT '0',
`seven` tinyint(3) DEFAULT '0',
`money` varchar(255) DEFAULT '',
`minprice` decimal(10,2) DEFAULT '0.00',
`maxprice` decimal(10,2) DEFAULT '0.00',
`province` varchar(255) DEFAULT '',
`city` varchar(255) DEFAULT '',
`buyshow` tinyint(1) DEFAULT '0',
`buycontent` text,
`saleupdate51117` tinyint(3) DEFAULT '0',
`virtualsend` tinyint(1) DEFAULT '0',
`virtualsendcontent` text,
`verifytype` tinyint(1) DEFAULT '0',
`diyfields` text,
`diysaveid` int(11) DEFAULT '0',
`diysave` tinyint(1) DEFAULT '0',
`quality` tinyint(3) DEFAULT '0',
`groupstype` tinyint(1) unsigned NOT NULL DEFAULT '0',
`showtotal` tinyint(1) unsigned NOT NULL DEFAULT '0',
`subtitle` varchar(255) DEFAULT '',
`sharebtn` tinyint(1) NOT NULL DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`checked` tinyint(3) DEFAULT '0',
`thumb_first` tinyint(3) DEFAULT '0',
`merchsale` tinyint(1) DEFAULT '0',
`catesinit3` text,
`showtotaladd` tinyint(1) DEFAULT '0',
`keywords` varchar(255) DEFAULT '',
`catch_id` varchar(255) DEFAULT '',
`catch_url` varchar(255) DEFAULT '',
`catch_source` varchar(255) DEFAULT '',
`labelname` text,
`autoreceive` int(11) DEFAULT '0',
`cannotrefund` tinyint(3) DEFAULT '0',
`bargain` int(11) DEFAULT '0',
`buyagain` decimal(10,2) DEFAULT '0.00',
`buyagain_islong` tinyint(1) DEFAULT '0',
`buyagain_condition` tinyint(1) DEFAULT '0',
`buyagain_sale` tinyint(1) DEFAULT '0',
`buyagain_commission` text,
`diypage` int(11) DEFAULT NULL,
`cashier` tinyint(1) DEFAULT '0',
`isendtime` tinyint(3) NOT NULL DEFAULT '0',
`usetime` int(11) NOT NULL DEFAULT '0',
`endtime` int(11) NOT NULL DEFAULT '0',
`merchdisplayorder` int(11) NOT NULL DEFAULT '0',
`exchange_stock` int(11) DEFAULT '0',
`exchange_postage` decimal(10,2) NOT NULL DEFAULT '0.00',
`ispresell` tinyint(3) NOT NULL DEFAULT '0',
`presellprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`presellover` tinyint(3) NOT NULL DEFAULT '0',
`presellovertime` int(11) NOT NULL,
`presellstart` tinyint(3) NOT NULL DEFAULT '0',
`preselltimestart` int(11) NOT NULL DEFAULT '0',
`presellend` tinyint(3) NOT NULL DEFAULT '0',
`preselltimeend` int(11) NOT NULL DEFAULT '0',
`presellsendtype` tinyint(3) NOT NULL DEFAULT '0',
`presellsendstatrttime` int(11) NOT NULL DEFAULT '0',
`presellsendtime` int(11) NOT NULL DEFAULT '0',
`edareas_code` text NOT NULL,
`unite_total` tinyint(3) NOT NULL DEFAULT '0',
`threen` varchar(255) DEFAULT '',
`buyagain_price` decimal(10,2) DEFAULT '0.00',
`intervalfloor` tinyint(1) DEFAULT '0',
`intervalprice` varchar(512) DEFAULT '',
`isfullback` tinyint(3) NOT NULL DEFAULT '0',
`isstatustime` tinyint(3) NOT NULL DEFAULT '0',
`statustimestart` int(10) NOT NULL DEFAULT '0',
`statustimeend` int(10) NOT NULL DEFAULT '0',
`nosearch` tinyint(1) NOT NULL DEFAULT '0',
`showsales` tinyint(3) NOT NULL DEFAULT '1',
`islive` int(11) NOT NULL DEFAULT '0',
`liveprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`opencard` tinyint(1) DEFAULT '0',
`cardid` varchar(255) DEFAULT '',
`verifygoodsnum` int(11) DEFAULT '1',
`verifygoodsdays` int(11) DEFAULT '1',
`verifygoodslimittype` tinyint(1) DEFAULT '0',
`verifygoodslimitdate` int(11) DEFAULT '0',
`minliveprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`maxliveprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`dowpayment` decimal(10,2) NOT NULL DEFAULT '0.00',
`tempid` int(11) NOT NULL DEFAULT '0',
`isstoreprice` tinyint(11) NOT NULL DEFAULT '0',
`beforehours` int(11) NOT NULL DEFAULT '0',
`newgoods` tinyint(3) NOT NULL DEFAULT '0',
`video` varchar(512) DEFAULT '',
`officthumb` varchar(512) DEFAULT '',
`verifygoodstype` tinyint(1) NOT NULL DEFAULT '0',
`isforceverifystore` tinyint(1) NOT NULL DEFAULT '0',
`manydeduct2` tinyint(1) DEFAULT '0',
`membercardpoint` int(2) NOT NULL DEFAULT '0',
`refund` tinyint(3) NOT NULL DEFAULT '0',
`returngoods` tinyint(3) NOT NULL DEFAULT '0',
`exchange` tinyint(3) NOT NULL DEFAULT '0',
`isdiscount_time_start` int(11) NOT NULL,
`import_id` int(11) NOT NULL DEFAULT '0',
`isshowfreight` int(2) NOT NULL DEFAULT '1',
`video_type` tinyint(3) NOT NULL DEFAULT '0',
`video_url` varchar(255) NOT NULL DEFAULT '',
`end_video_url` text NOT NULL,
`video_cut` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_pcate` (`pcate`),
KEY `idx_ccate` (`ccate`),
KEY `idx_isnew` (`isnew`),
KEY `idx_ishot` (`ishot`),
KEY `idx_isdiscount` (`isdiscount`),
KEY `idx_isrecommand` (`isrecommand`),
KEY `idx_iscomment` (`iscomment`),
KEY `idx_issendfree` (`issendfree`),
KEY `idx_istime` (`istime`),
KEY `idx_deleted` (`deleted`),
KEY `idx_tcate` (`tcate`),
KEY `idx_scate` (`tcate`),
KEY `idx_merchid` (`merchid`),
KEY `idx_checked` (`checked`),
KEY `idx_productsn` (`productsn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_cards` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`card_id` varchar(255) DEFAULT NULL,
`card_title` varchar(255) DEFAULT NULL,
`card_brand_name` varchar(255) DEFAULT NULL,
`card_totalquantity` int(11) DEFAULT NULL,
`card_quantity` int(11) DEFAULT NULL,
`card_logoimg` varchar(255) DEFAULT NULL,
`card_logowxurl` varchar(255) DEFAULT NULL,
`card_backgroundtype` tinyint(1) DEFAULT NULL,
`color` varchar(255) DEFAULT NULL,
`card_backgroundimg` varchar(255) DEFAULT NULL,
`card_backgroundwxurl` varchar(255) DEFAULT NULL,
`prerogative` varchar(255) DEFAULT NULL,
`card_description` varchar(255) DEFAULT NULL,
`freewifi` tinyint(1) DEFAULT NULL,
`withpet` tinyint(1) DEFAULT NULL,
`freepark` tinyint(1) DEFAULT NULL,
`deliver` tinyint(1) DEFAULT NULL,
`custom_cell1` tinyint(1) DEFAULT NULL,
`custom_cell1_name` varchar(255) DEFAULT NULL,
`custom_cell1_tips` varchar(255) DEFAULT NULL,
`custom_cell1_url` varchar(255) DEFAULT NULL,
`color2` varchar(20) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`goodsid` int(10) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`nickname` varchar(50) DEFAULT '',
`headimgurl` varchar(255) DEFAULT '',
`content` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_openid` (`openid`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`goodsids` text NOT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_label` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`label` varchar(255) NOT NULL DEFAULT '',
`labelname` text NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_labelstyle` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`style` int(3) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_option` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`goodsid` int(10) DEFAULT '0',
`title` varchar(50) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`productprice` decimal(10,2) DEFAULT '0.00',
`marketprice` decimal(10,2) DEFAULT '0.00',
`costprice` decimal(10,2) DEFAULT '0.00',
`stock` int(11) DEFAULT '0',
`weight` decimal(10,2) DEFAULT '0.00',
`displayorder` int(11) DEFAULT '0',
`specs` text,
`skuId` varchar(255) DEFAULT '',
`goodssn` varchar(255) DEFAULT '',
`productsn` varchar(255) DEFAULT '',
`virtual` int(11) DEFAULT '0',
`exchange_stock` int(11) DEFAULT '0',
`exchange_postage` decimal(10,2) NOT NULL DEFAULT '0.00',
`presellprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`day` int(3) NOT NULL,
`allfullbackprice` decimal(10,2) NOT NULL,
`fullbackprice` decimal(10,2) NOT NULL,
`allfullbackratio` decimal(10,2) DEFAULT NULL,
`fullbackratio` decimal(10,2) DEFAULT NULL,
`isfullback` tinyint(3) NOT NULL,
`islive` int(11) NOT NULL,
`liveprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`cycelbuy_periodic` varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_productsn` (`productsn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_param` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`goodsid` int(10) DEFAULT '0',
`title` varchar(50) DEFAULT '',
`value` text,
`displayorder` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_spec` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`goodsid` int(11) DEFAULT '0',
`title` varchar(50) DEFAULT '',
`description` varchar(1000) DEFAULT '',
`displaytype` tinyint(3) DEFAULT '0',
`content` text,
`displayorder` int(11) DEFAULT '0',
`propId` varchar(255) DEFAULT '',
`iscycelbuy` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goods_spec_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`specid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`show` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`valueId` varchar(255) DEFAULT '',
`virtual` int(11) DEFAULT '0',
`cycelbuy_periodic` varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_specid` (`specid`),
KEY `idx_show` (`show`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goodscircle_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(65) DEFAULT '',
`op_type` varchar(16) DEFAULT '',
`op_id` int(11) NOT NULL DEFAULT '0',
`is_success` tinyint(1) NOT NULL DEFAULT '1',
`response_msg` varchar(255) NOT NULL DEFAULT '',
`createtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_unid` (`uniacid`),
KEY `idx_optype` (`op_type`),
KEY `idx_opid` (`op_id`),
KEY `idx_succ` (`is_success`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_goodscode_good` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`goodsid` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`thumb` varchar(255) NOT NULL,
`qrcode` varchar(255) NOT NULL,
`status` tinyint(3) NOT NULL,
`displayorder` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(50) DEFAULT NULL,
`thumb` varchar(255) DEFAULT NULL,
`displayorder` tinyint(3) unsigned DEFAULT '0',
`enabled` tinyint(1) DEFAULT '1',
`advimg` varchar(255) DEFAULT '',
`advurl` varchar(500) DEFAULT '',
`isrecommand` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_enabled` (`enabled`),
KEY `idx_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`displayorder` int(11) unsigned DEFAULT '0',
`uniacid` int(11) DEFAULT '0',
`goodssn` varchar(50) DEFAULT NULL,
`productsn` varchar(50) DEFAULT NULL,
`title` varchar(255) NOT NULL DEFAULT '',
`category` int(11) DEFAULT NULL,
`showstock` tinyint(2) NOT NULL,
`stock` int(11) NOT NULL DEFAULT '0',
`price` decimal(10,2) DEFAULT '0.00',
`groupsprice` decimal(10,2) DEFAULT '0.00',
`goodsnum` int(11) NOT NULL DEFAULT '1',
`purchaselimit` int(11) NOT NULL DEFAULT '0',
`single` tinyint(2) NOT NULL DEFAULT '0',
`singleprice` decimal(10,2) DEFAULT '0.00',
`units` varchar(255) NOT NULL DEFAULT '件',
`dispatchtype` tinyint(2) NOT NULL,
`dispatchid` int(11) NOT NULL,
`freight` decimal(10,2) DEFAULT '0.00',
`endtime` int(11) unsigned NOT NULL DEFAULT '0',
`groupnum` int(10) NOT NULL DEFAULT '0',
`sales` int(10) NOT NULL DEFAULT '0',
`thumb` varchar(255) DEFAULT '',
`description` varchar(1000) DEFAULT NULL,
`content` text,
`createtime` int(11) unsigned NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '0',
`isindex` tinyint(3) NOT NULL DEFAULT '0',
`deleted` tinyint(3) NOT NULL DEFAULT '0',
`goodsid` int(11) NOT NULL DEFAULT '0',
`followneed` tinyint(2) NOT NULL DEFAULT '0',
`followtext` varchar(255) DEFAULT NULL,
`followurl` varchar(255) DEFAULT NULL,
`share_title` varchar(255) DEFAULT NULL,
`share_icon` varchar(255) DEFAULT NULL,
`share_desc` varchar(500) DEFAULT NULL,
`deduct` decimal(10,2) NOT NULL DEFAULT '0.00',
`thumb_url` text,
`rights` tinyint(2) NOT NULL DEFAULT '1',
`gid` int(11) DEFAULT '0',
`discount` tinyint(3) DEFAULT '0',
`headstype` tinyint(3) DEFAULT NULL,
`headsmoney` decimal(10,2) DEFAULT '0.00',
`headsdiscount` int(11) DEFAULT '0',
`isdiscount` tinyint(3) DEFAULT '0',
`isverify` tinyint(3) DEFAULT '0',
`verifytype` tinyint(3) DEFAULT '0',
`verifynum` int(11) DEFAULT '0',
`storeids` text,
`merchid` int(11) DEFAULT '0',
`shorttitle` varchar(255) DEFAULT '',
`teamnum` int(11) DEFAULT '0',
`more_spec` tinyint(1) DEFAULT '0',
`is_ladder` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`category`),
KEY `idx_createtime` (`createtime`),
KEY `idx_status` (`status`),
KEY `idx_category` (`category`),
KEY `idx_dispatchid` (`dispatchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_goods_atlas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`g_id` int(11) NOT NULL,
`thumb` varchar(145) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_goods_option` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`goodsid` int(11) DEFAULT '0',
`groups_goods_id` int(255) DEFAULT '0',
`goods_option_id` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT NULL,
`marketprice` decimal(10,2) DEFAULT NULL,
`price` decimal(10,2) DEFAULT NULL,
`single_price` decimal(10,2) DEFAULT NULL,
`specs` varchar(255) DEFAULT NULL,
`stock` int(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_ladder` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`goods_id` int(11) DEFAULT '0',
`ladder_num` int(11) DEFAULT NULL,
`ladder_price` decimal(10,2) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(45) NOT NULL,
`orderno` varchar(45) NOT NULL,
`groupnum` int(11) NOT NULL,
`paytime` int(11) NOT NULL,
`credit` int(11) DEFAULT '0',
`creditmoney` decimal(11,2) DEFAULT '0.00',
`price` decimal(11,2) DEFAULT '0.00',
`freight` decimal(11,2) DEFAULT '0.00',
`status` int(9) NOT NULL,
`pay_type` varchar(45) DEFAULT NULL,
`dispatchid` int(11) DEFAULT NULL,
`addressid` int(11) NOT NULL DEFAULT '0',
`address` varchar(1000) DEFAULT NULL,
`goodid` int(11) NOT NULL,
`teamid` int(11) NOT NULL,
`is_team` int(2) NOT NULL,
`heads` int(11) DEFAULT '0',
`discount` decimal(10,2) DEFAULT '0.00',
`starttime` int(11) NOT NULL,
`canceltime` int(11) NOT NULL DEFAULT '0',
`endtime` int(45) NOT NULL,
`createtime` int(11) NOT NULL,
`finishtime` int(11) NOT NULL DEFAULT '0',
`refundid` int(11) NOT NULL DEFAULT '0',
`refundstate` tinyint(2) NOT NULL DEFAULT '0',
`refundtime` int(11) NOT NULL DEFAULT '0',
`express` varchar(45) DEFAULT NULL,
`expresscom` varchar(100) DEFAULT NULL,
`expresssn` varchar(45) DEFAULT NULL,
`sendtime` int(45) DEFAULT '0',
`remark` varchar(255) DEFAULT NULL,
`remarkclose` text,
`remarksend` text,
`message` varchar(255) DEFAULT NULL,
`success` int(2) NOT NULL DEFAULT '0',
`deleted` int(2) NOT NULL DEFAULT '0',
`realname` varchar(20) DEFAULT NULL,
`mobile` varchar(11) DEFAULT NULL,
`isverify` tinyint(3) DEFAULT '0',
`verifytype` tinyint(3) DEFAULT '0',
`verifycode` varchar(45) DEFAULT '0',
`verifynum` int(11) DEFAULT '0',
`printstate` int(11) NOT NULL DEFAULT '0',
`printstate2` int(11) NOT NULL DEFAULT '0',
`apppay` tinyint(3) NOT NULL DEFAULT '0',
`isborrow` tinyint(1) DEFAULT '0',
`borrowopenid` varchar(50) DEFAULT '',
`source` tinyint(1) DEFAULT '0',
`ladder_id` int(11) DEFAULT '0',
`is_ladder` tinyint(1) DEFAULT '0',
`more_spec` tinyint(1) DEFAULT '0',
`wxapp_prepay_id` varchar(255) DEFAULT '',
`cancel_reason` varchar(255) DEFAULT '',
`goods_price` decimal(10,2) DEFAULT '0.00',
`goods_option_id` int(11) DEFAULT '0',
`specs` varchar(255) DEFAULT '',
`diyformid` int(11) DEFAULT '0',
`diyformdata` text,
`diyformfields` text,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_orderno` (`orderno`),
KEY `idx_paytime` (`paytime`),
KEY `idx_pay_type` (`pay_type`),
KEY `idx_teamid` (`teamid`),
KEY `idx_verifycode` (`verifycode`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_order_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`goods_id` int(11) DEFAULT '0',
`groups_goods_id` int(11) DEFAULT '0',
`groups_goods_option_id` int(11) DEFAULT '0',
`groups_order_id` int(11) DEFAULT '0',
`price` decimal(10,2) DEFAULT NULL,
`option_name` varchar(255) DEFAULT NULL,
`create_time` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_order_refund` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(45) NOT NULL DEFAULT '',
`orderid` int(11) NOT NULL DEFAULT '0',
`refundno` varchar(45) NOT NULL DEFAULT '',
`refundstatus` tinyint(3) NOT NULL DEFAULT '0',
`refundaddressid` int(11) NOT NULL DEFAULT '0',
`refundaddress` varchar(1000) NOT NULL DEFAULT '',
`content` varchar(255) NOT NULL DEFAULT '',
`reason` varchar(255) NOT NULL DEFAULT '',
`images` varchar(255) NOT NULL DEFAULT '',
`applytime` varchar(45) NOT NULL DEFAULT '',
`applycredit` int(11) NOT NULL DEFAULT '0',
`applyprice` decimal(11,2) NOT NULL DEFAULT '0.00',
`reply` text NOT NULL,
`refundtype` varchar(45) NOT NULL DEFAULT '',
`rtype` int(3) NOT NULL DEFAULT '0',
`refundtime` varchar(45) NOT NULL,
`endtime` varchar(45) NOT NULL DEFAULT '',
`message` varchar(255) NOT NULL DEFAULT '',
`operatetime` varchar(45) NOT NULL DEFAULT '',
`realcredit` int(11) NOT NULL DEFAULT '0',
`realmoney` decimal(11,2) NOT NULL DEFAULT '0.00',
`express` varchar(45) NOT NULL DEFAULT '',
`expresscom` varchar(100) NOT NULL DEFAULT '',
`expresssn` varchar(45) NOT NULL DEFAULT '',
`sendtime` varchar(45) NOT NULL DEFAULT '',
`returntime` int(11) NOT NULL DEFAULT '0',
`rexpress` varchar(45) NOT NULL DEFAULT '',
`rexpresscom` varchar(100) NOT NULL DEFAULT '',
`rexpresssn` varchar(45) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `openid` (`openid`),
KEY `orderid` (`orderid`),
KEY `refundno` (`refundno`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_paylog` (
`plid` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(20) NOT NULL,
`uniacid` int(11) NOT NULL,
`acid` int(10) unsigned NOT NULL,
`openid` varchar(40) NOT NULL,
`tid` varchar(64) NOT NULL,
`credit` int(10) NOT NULL DEFAULT '0',
`creditmoney` decimal(10,2) NOT NULL,
`fee` decimal(10,2) DEFAULT '0.00',
`status` tinyint(4) NOT NULL,
`module` varchar(50) NOT NULL,
`tag` varchar(2000) NOT NULL,
`is_usecard` tinyint(3) unsigned NOT NULL,
`card_type` tinyint(3) unsigned NOT NULL,
`card_id` varchar(50) DEFAULT '',
`card_fee` decimal(10,2) DEFAULT '0.00',
`encrypt_code` varchar(100) DEFAULT '',
`uniontid` varchar(50) DEFAULT '',
PRIMARY KEY (`plid`),
KEY `idx_openid` (`openid`),
KEY `idx_tid` (`tid`),
KEY `idx_uniacid` (`uniacid`),
KEY `uniontid` (`uniontid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_set` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` varchar(45) DEFAULT NULL,
`groups` int(2) NOT NULL DEFAULT '0',
`followurl` varchar(255) DEFAULT NULL,
`followqrcode` varchar(255) DEFAULT NULL,
`groupsurl` varchar(255) DEFAULT NULL,
`share_title` varchar(255) DEFAULT NULL,
`share_icon` varchar(255) DEFAULT NULL,
`share_desc` varchar(255) DEFAULT NULL,
`share_url` varchar(255) DEFAULT NULL,
`groups_description` text,
`description` int(2) NOT NULL DEFAULT '0',
`creditdeduct` tinyint(2) NOT NULL DEFAULT '0',
`groupsdeduct` tinyint(2) NOT NULL DEFAULT '0',
`credit` int(11) NOT NULL DEFAULT '1',
`groupsmoney` decimal(11,2) NOT NULL DEFAULT '0.00',
`refund` int(11) NOT NULL DEFAULT '0',
`refundday` int(11) NOT NULL DEFAULT '0',
`goodsid` text NOT NULL,
`rules` text,
`receive` int(11) DEFAULT '0',
`discount` tinyint(3) DEFAULT '0',
`headstype` tinyint(3) DEFAULT '0',
`headsmoney` decimal(10,2) DEFAULT '0.00',
`headsdiscount` int(11) DEFAULT '0',
`followbar` tinyint(2) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_groups_verify` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(45) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`verifycode` varchar(45) DEFAULT '',
`storeid` int(11) DEFAULT '0',
`verifier` varchar(45) DEFAULT '0',
`isverify` tinyint(3) DEFAULT '0',
`verifytime` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_invitation` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`type` tinyint(3) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`data` text NOT NULL,
`scan` int(11) NOT NULL DEFAULT '0',
`follow` int(11) NOT NULL DEFAULT '0',
`qrcode` tinyint(3) NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL,
`createtime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_invitation_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`invitation_id` int(11) NOT NULL DEFAULT '0',
`openid` varchar(50) NOT NULL DEFAULT '',
`invitation_openid` varchar(50) NOT NULL DEFAULT '',
`scan_time` int(10) NOT NULL DEFAULT '0',
`follow` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_posterid` (`invitation_id`),
KEY `idx_scantime` (`scan_time`),
KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_invitation_qr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`acid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(60) NOT NULL,
`invitationid` int(11) NOT NULL,
`roomid` int(11) NOT NULL DEFAULT '0',
`sceneid` int(11) NOT NULL,
`ticket` varchar(255) NOT NULL,
`createtime` int(11) NOT NULL,
`expire` int(11) NOT NULL DEFAULT '0',
`qrimg` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL,
`livetype` tinyint(3) NOT NULL DEFAULT '0',
`liveidentity` varchar(50) NOT NULL,
`screen` tinyint(3) NOT NULL DEFAULT '0',
`goodsid` text NOT NULL,
`category` int(11) NOT NULL DEFAULT '0',
`url` varchar(1000) NOT NULL,
`thumb` varchar(1000) NOT NULL,
`hot` tinyint(3) NOT NULL DEFAULT '0',
`recommend` tinyint(3) NOT NULL DEFAULT '0',
`living` tinyint(3) NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
`livetime` int(10) NOT NULL DEFAULT '0',
`lastlivetime` int(11) NOT NULL DEFAULT '0',
`createtime` int(10) NOT NULL DEFAULT '0',
`introduce` text NOT NULL,
`packetmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`packettotal` int(11) NOT NULL DEFAULT '0',
`packetprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`packetdes` varchar(255) NOT NULL,
`couponid` varchar(255) NOT NULL,
`share_title` varchar(255) NOT NULL,
`share_icon` varchar(1000) NOT NULL,
`share_desc` text NOT NULL,
`share_url` varchar(1000) NOT NULL DEFAULT '',
`subscribe` int(11) NOT NULL DEFAULT '0',
`subscribenotice` tinyint(3) NOT NULL DEFAULT '0',
`visit` int(11) NOT NULL DEFAULT '0',
`video` varchar(1000) NOT NULL DEFAULT '',
`covertype` tinyint(3) NOT NULL DEFAULT '0',
`cover` varchar(1000) NOT NULL DEFAULT '',
`iscoupon` tinyint(3) NOT NULL DEFAULT '0',
`nestable` text NOT NULL,
`tabs` text NOT NULL,
`invitation_id` int(11) NOT NULL DEFAULT '0',
`showlevels` varchar(255) NOT NULL,
`showgroups` varchar(255) NOT NULL,
`showcommission` varchar(255) NOT NULL,
`jurisdiction_url` varchar(1000) NOT NULL,
`jurisdictionurl_show` tinyint(3) NOT NULL DEFAULT '0',
`notice` varchar(255) NOT NULL,
`notice_url` varchar(1000) NOT NULL,
`followqrcode` varchar(1000) NOT NULL,
`coupon_num` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_merchid` (`merchid`),
KEY `idx_category` (`category`),
KEY `idx_hot` (`hot`),
KEY `idx_recommend` (`recommend`),
KEY `idx_living` (`living`),
KEY `idx_status` (`status`),
KEY `idx_livetime` (`livetime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(50) DEFAULT NULL,
`thumb` varchar(255) DEFAULT NULL,
`displayorder` tinyint(3) unsigned DEFAULT '0',
`enabled` tinyint(1) DEFAULT '1',
`advimg` varchar(255) DEFAULT '',
`advurl` varchar(500) DEFAULT '',
`isrecommand` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_enabled` (`enabled`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_coupon` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`roomid` int(11) NOT NULL DEFAULT '0',
`couponid` int(11) NOT NULL DEFAULT '0',
`coupontotal` int(11) NOT NULL DEFAULT '0',
`couponlimit` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_roomid` (`roomid`),
KEY `idx_couponid` (`couponid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_favorite` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`roomid` int(11) NOT NULL DEFAULT '0',
`openid` tinytext NOT NULL,
`deleted` tinyint(3) NOT NULL DEFAULT '0',
`createtime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_roomid` (`roomid`),
KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`goodsid` int(11) NOT NULL DEFAULT '0',
`liveid` int(11) NOT NULL DEFAULT '0',
`liveprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`minliveprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`maxliveprice` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_goods_option` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`goodsid` int(11) NOT NULL,
`optionid` int(11) NOT NULL DEFAULT '0',
`liveid` int(11) NOT NULL DEFAULT '0',
`liveprice` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_setting` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`ismember` tinyint(3) NOT NULL DEFAULT '0',
`share_title` varchar(255) NOT NULL,
`share_icon` varchar(1000) NOT NULL,
`share_desc` varchar(255) NOT NULL,
`share_url` varchar(255) NOT NULL,
`livenoticetime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_ismember` (`ismember`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_status` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`roomid` int(11) NOT NULL DEFAULT '0',
`starttime` int(11) NOT NULL DEFAULT '0',
`endtime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_live_view` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(50) NOT NULL,
`roomid` int(11) NOT NULL DEFAULT '0',
`viewing` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_roomid` (`roomid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_lottery` (
`lottery_id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`lottery_title` varchar(150) DEFAULT NULL,
`lottery_icon` varchar(255) DEFAULT NULL,
`lottery_banner` varchar(255) DEFAULT NULL,
`lottery_cannot` varchar(255) DEFAULT NULL,
`lottery_type` tinyint(1) DEFAULT NULL,
`is_delete` tinyint(1) DEFAULT '0',
`addtime` int(11) DEFAULT NULL,
`lottery_data` text,
`is_goods` tinyint(1) DEFAULT '0',
`lottery_days` int(11) DEFAULT '0',
`task_type` tinyint(1) DEFAULT '0',
`task_data` text,
`start_time` int(11) DEFAULT NULL,
`end_time` int(11) DEFAULT NULL,
`award_start` int(11) DEFAULT '0',
`award_end` int(11) DEFAULT '0',
PRIMARY KEY (`lottery_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_lottery_default` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`data` text,
`addtime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_lottery_join` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`join_user` varchar(255) DEFAULT NULL,
`lottery_id` int(11) DEFAULT NULL,
`lottery_num` int(10) DEFAULT '0',
`lottery_tag` varchar(255) DEFAULT NULL,
`addtime` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_lottery_log` (
`log_id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`lottery_id` int(11) DEFAULT '0',
`join_user` varchar(255) DEFAULT NULL,
`lottery_data` text,
`is_reward` tinyint(1) DEFAULT '0',
`addtime` int(11) DEFAULT NULL,
PRIMARY KEY (`log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_mc_merchant` (
`id` int(11) NOT NULL,
`uniacid` int(11) NOT NULL,
`merchant_no` varchar(255) NOT NULL DEFAULT '',
`username` varchar(255) NOT NULL DEFAULT '',
`password` varchar(32) NOT NULL DEFAULT '',
`salt` varchar(8) NOT NULL DEFAULT '',
`contact_name` varchar(255) NOT NULL DEFAULT '',
`contact_mobile` varchar(16) NOT NULL DEFAULT '',
`contact_address` varchar(255) NOT NULL DEFAULT '',
`type` tinyint(4) NOT NULL,
`status` tinyint(4) NOT NULL,
`createtime` int(11) NOT NULL,
`validitytime` int(11) NOT NULL,
`industry` varchar(255) NOT NULL DEFAULT '',
`remark` varchar(1000) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`uid` int(11) DEFAULT '0',
`groupid` varchar(1000) DEFAULT '',
`level` int(11) DEFAULT '0',
`agentid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`realname` varchar(20) DEFAULT '',
`mobile` varchar(11) DEFAULT '',
`pwd` varchar(32) DEFAULT '',
`weixin` varchar(100) DEFAULT '',
`content` text,
`createtime` int(10) DEFAULT '0',
`agenttime` int(10) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`isagent` tinyint(1) DEFAULT '0',
`clickcount` int(11) DEFAULT '0',
`agentlevel` int(11) DEFAULT '0',
`noticeset` text,
`nickname` varchar(255) DEFAULT '',
`credit1` decimal(10,2) DEFAULT '0.00',
`credit2` decimal(10,2) DEFAULT '0.00',
`birthyear` varchar(255) DEFAULT '',
`birthmonth` varchar(255) DEFAULT '',
`birthday` varchar(255) DEFAULT '',
`gender` tinyint(3) DEFAULT '0',
`avatar` varchar(255) DEFAULT '',
`province` varchar(255) DEFAULT '',
`city` varchar(255) DEFAULT '',
`area` varchar(255) DEFAULT '',
`childtime` int(11) DEFAULT '0',
`inviter` int(11) DEFAULT '0',
`agentnotupgrade` int(11) DEFAULT '0',
`agentselectgoods` tinyint(3) DEFAULT '0',
`agentblack` int(11) DEFAULT '0',
`fixagentid` tinyint(3) DEFAULT '0',
`username` varchar(255) DEFAULT '',
`diymemberid` int(11) DEFAULT '0',
`diymemberdataid` int(11) DEFAULT '0',
`diymemberdata` text,
`diycommissionid` int(11) DEFAULT '0',
`diycommissiondataid` int(11) DEFAULT '0',
`diycommissiondata` text,
`isblack` int(11) DEFAULT '0',
`diymemberfields` text,
`diycommissionfields` text,
`commission_total` decimal(10,2) DEFAULT '0.00',
`endtime2` int(11) DEFAULT '0',
`ispartner` tinyint(3) DEFAULT '0',
`partnertime` int(11) DEFAULT '0',
`partnerstatus` tinyint(3) DEFAULT '0',
`partnerblack` tinyint(3) DEFAULT '0',
`partnerlevel` int(11) DEFAULT '0',
`partnernotupgrade` tinyint(3) DEFAULT '0',
`diyglobonusid` int(11) DEFAULT '0',
`diyglobonusdata` text,
`diyglobonusfields` text,
`isaagent` tinyint(3) DEFAULT '0',
`aagentlevel` int(11) DEFAULT '0',
`aagenttime` int(11) DEFAULT '0',
`aagentstatus` tinyint(3) DEFAULT '0',
`aagentblack` tinyint(3) DEFAULT '0',
`aagentnotupgrade` tinyint(3) DEFAULT '0',
`aagenttype` tinyint(3) DEFAULT '0',
`aagentprovinces` text,
`aagentcitys` text,
`aagentareas` text,
`diyaagentid` int(11) DEFAULT '0',
`diyaagentdata` text,
`diyaagentfields` text,
`salt` varchar(32) DEFAULT NULL,
`mobileverify` tinyint(3) DEFAULT '0',
`mobileuser` tinyint(3) DEFAULT '0',
`carrier_mobile` varchar(11) DEFAULT '0',
`isauthor` tinyint(1) DEFAULT '0',
`authortime` int(11) DEFAULT '0',
`authorstatus` tinyint(1) DEFAULT '0',
`authorblack` tinyint(1) DEFAULT '0',
`authorlevel` int(11) DEFAULT '0',
`authornotupgrade` tinyint(1) DEFAULT '0',
`diyauthorid` int(11) DEFAULT '0',
`diyauthordata` text,
`diyauthorfields` text,
`authorid` int(11) DEFAULT '0',
`comefrom` varchar(20) DEFAULT NULL,
`openid_qq` varchar(50) NOT NULL,
`openid_wx` varchar(50) NOT NULL,
`diymaxcredit` tinyint(3) DEFAULT '0',
`maxcredit` int(11) DEFAULT '0',
`datavalue` varchar(50) NOT NULL DEFAULT '',
`openid_wa` varchar(50) NOT NULL,
`nickname_wechat` varchar(255) DEFAULT '',
`avatar_wechat` varchar(255) DEFAULT '',
`updateaddress` tinyint(1) NOT NULL DEFAULT '0',
`membercardid` varchar(255) DEFAULT '',
`membercardcode` varchar(255) DEFAULT '',
`membershipnumber` varchar(255) DEFAULT '',
`membercardactive` tinyint(1) DEFAULT '0',
`idnumber` varchar(255) DEFAULT NULL,
`wxcardupdatetime` int(11) DEFAULT '0',
`hasnewcoupon` tinyint(1) DEFAULT '0',
`isheads` tinyint(1) NOT NULL DEFAULT '0',
`headsstatus` tinyint(1) NOT NULL DEFAULT '0',
`headstime` int(11) NOT NULL DEFAULT '0',
`headsid` int(11) NOT NULL DEFAULT '0',
`diyheadsid` int(11) NOT NULL DEFAULT '0',
`diyheadsdata` text,
`diyheadsfields` text,
`applyagenttime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_shareid` (`agentid`),
KEY `idx_openid` (`openid`),
KEY `idx_status` (`status`),
KEY `idx_agenttime` (`agenttime`),
KEY `idx_isagent` (`isagent`),
KEY `idx_uid` (`uid`),
KEY `idx_groupid` (`groupid`(255)),
KEY `idx_level` (`level`),
KEY `idx_mobile` (`mobile`),
KEY `idx_openid_wx` (`openid_wx`),
KEY `idx_openid_wa` (`openid_wa`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_address` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '0',
`realname` varchar(20) DEFAULT '',
`mobile` varchar(11) DEFAULT '',
`province` varchar(30) DEFAULT '',
`city` varchar(30) DEFAULT '',
`area` varchar(30) DEFAULT '',
`address` varchar(300) DEFAULT '',
`isdefault` tinyint(1) DEFAULT '0',
`zipcode` varchar(255) DEFAULT '',
`deleted` tinyint(1) DEFAULT '0',
`street` varchar(50) NOT NULL DEFAULT '',
`datavalue` varchar(50) NOT NULL DEFAULT '',
`streetdatavalue` varchar(30) NOT NULL DEFAULT '',
`lng` varchar(255) NOT NULL DEFAULT '',
`lat` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_isdefault` (`isdefault`),
KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_card` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT NULL,
`card_style` varchar(255) DEFAULT NULL,
`sort_order` int(10) DEFAULT '0',
`shipping` tinyint(11) DEFAULT NULL,
`member_discount` tinyint(1) DEFAULT NULL,
`discount_rate` decimal(10,1) DEFAULT NULL,
`discount` tinyint(1) NOT NULL DEFAULT '1',
`is_card_points` tinyint(1) DEFAULT NULL,
`card_points` varchar(50) DEFAULT NULL,
`is_card_coupon` tinyint(1) DEFAULT NULL,
`card_coupon` varchar(500) DEFAULT NULL,
`is_month_points` tinyint(1) DEFAULT NULL,
`month_points` varchar(50) DEFAULT NULL,
`is_month_coupon` tinyint(1) DEFAULT NULL,
`month_coupon` varchar(500) DEFAULT NULL,
`validate` int(11) NOT NULL DEFAULT '1',
`price` decimal(11,2) NOT NULL DEFAULT '0.00',
`stock` int(10) DEFAULT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
`description` text,
`kefu_tel` varchar(100) DEFAULT NULL,
`create_time` int(11) NOT NULL DEFAULT '0',
`sale_count` int(11) NOT NULL DEFAULT '0',
`del_time` int(11) NOT NULL DEFAULT '0',
`isdelete` tinyint(11) NOT NULL DEFAULT '0',
`update_time` int(11) NOT NULL DEFAULT '0',
`cardmodel` int(2) DEFAULT '1',
`goodsids` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_card_buysend` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`member_card_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`receive_time` int(11) NOT NULL DEFAULT '0',
`create_time` int(11) NOT NULL DEFAULT '0',
`price` decimal(11,2) NOT NULL DEFAULT '0.00',
`sendtype` tinyint(1) NOT NULL DEFAULT '1',
`card_points` varchar(50) DEFAULT NULL,
`card_couponid` int(11) NOT NULL DEFAULT '0',
`card_couponcount` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_card_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`order_id` int(11) NOT NULL,
`openid` varchar(50) DEFAULT '',
`member_card_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`expire_time` int(11) NOT NULL DEFAULT '0',
`receive_time` int(11) NOT NULL DEFAULT '0',
`price` decimal(11,2) NOT NULL DEFAULT '0.00',
`user_name` varchar(255) DEFAULT NULL,
`telephone` varchar(32) DEFAULT NULL,
`isdelete` int(11) NOT NULL DEFAULT '0',
`del_time` int(11) NOT NULL DEFAULT '0',
`pay_type` int(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_card_monthsend` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`member_card_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`receive_time` int(11) NOT NULL DEFAULT '0',
`create_time` int(11) NOT NULL DEFAULT '0',
`price` decimal(11,2) NOT NULL DEFAULT '0.00',
`validate` int(11) NOT NULL DEFAULT '1',
`sendtype` tinyint(1) NOT NULL DEFAULT '1',
`card_points` varchar(50) DEFAULT NULL,
`card_couponid` int(11) NOT NULL DEFAULT '0',
`card_couponcount` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_card_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`member_id` int(11) DEFAULT '0',
`payment_name` varchar(32) DEFAULT NULL,
`telephone` varchar(32) DEFAULT NULL,
`orderno` varchar(30) DEFAULT NULL,
`total` decimal(15,2) NOT NULL DEFAULT '0.00',
`status` int(11) NOT NULL DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`finishtime` int(11) DEFAULT '0',
`paytime` int(11) DEFAULT '0',
`member_card_id` int(11) DEFAULT '0',
`wxapp_prepay_id` varchar(255) DEFAULT '',
`transid` varchar(32) DEFAULT '',
`paytype` varchar(32) DEFAULT '',
`apppay` tinyint(3) NOT NULL DEFAULT '0',
`borrowopenid` varchar(50) DEFAULT NULL,
`isborrow` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_card_uselog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`order_id` int(11) NOT NULL,
`member_card_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`shipping` tinyint(1) DEFAULT '0',
`discount_rate` varchar(50) DEFAULT NULL,
`order_price` decimal(11,2) NOT NULL DEFAULT '0.00',
`dec_price` decimal(11,2) NOT NULL DEFAULT '0.00',
`create_time` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_cart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(100) DEFAULT '',
`goodsid` int(11) DEFAULT '0',
`total` int(11) DEFAULT '0',
`marketprice` decimal(10,2) DEFAULT '0.00',
`deleted` tinyint(1) DEFAULT '0',
`optionid` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`diyformdataid` int(11) DEFAULT '0',
`diyformdata` text,
`diyformfields` text,
`diyformid` int(11) DEFAULT '0',
`selected` tinyint(1) DEFAULT '1',
`merchid` int(11) DEFAULT '0',
`selectedadd` tinyint(1) DEFAULT '1',
`isnewstore` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_openid` (`openid`),
KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_credit_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) unsigned NOT NULL,
`openid` varchar(255) DEFAULT '',
`uniacid` int(11) NOT NULL,
`credittype` varchar(10) NOT NULL,
`num` decimal(10,2) NOT NULL,
`operator` int(10) unsigned NOT NULL,
`createtime` int(10) unsigned NOT NULL,
`remark` varchar(200) NOT NULL,
`module` varchar(30) NOT NULL,
`presentcredit` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_favorite` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`goodsid` int(10) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`deleted` tinyint(1) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`type` int(11) DEFAULT '0',
`thumb` varchar(255) DEFAULT '',
`title` varchar(255) DEFAULT '',
`marketprice` decimal(10,2) DEFAULT '0.00',
`productprice` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_openid` (`openid`),
KEY `idx_deleted` (`deleted`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`groupname` varchar(255) DEFAULT '',
`description` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_group_log` (
`log_id` int(11) NOT NULL AUTO_INCREMENT,
`mid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(50) NOT NULL DEFAULT '0',
`group_id` int(11) NOT NULL DEFAULT '0',
`add_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`content` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`log_id`),
KEY `group_id` (`group_id`),
KEY `openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`goodsid` int(10) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`deleted` tinyint(1) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`times` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_openid` (`openid`),
KEY `idx_deleted` (`deleted`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_level` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`level` int(11) DEFAULT '0',
`levelname` varchar(50) DEFAULT '',
`ordermoney` decimal(10,2) DEFAULT '0.00',
`ordercount` int(10) DEFAULT '0',
`discount` decimal(10,2) DEFAULT '0.00',
`enabled` tinyint(3) DEFAULT '0',
`enabledadd` tinyint(1) DEFAULT '0',
`buygoods` tinyint(1) NOT NULL DEFAULT '0',
`goodsids` text NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`type` tinyint(3) DEFAULT NULL COMMENT '0 充值 1 提现',
`logno` varchar(255) DEFAULT '',
`title` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`status` int(11) DEFAULT '0' COMMENT '0 生成 1 成功 2 失败',
`money` decimal(10,2) DEFAULT '0.00',
`rechargetype` varchar(255) DEFAULT '' COMMENT '充值类型',
`gives` decimal(10,2) DEFAULT NULL,
`couponid` int(11) DEFAULT '0',
`transid` varchar(255) DEFAULT '',
`realmoney` decimal(10,2) DEFAULT '0.00',
`charge` decimal(10,2) DEFAULT '0.00',
`deductionmoney` decimal(10,2) DEFAULT '0.00',
`isborrow` tinyint(3) DEFAULT '0',
`borrowopenid` varchar(100) DEFAULT '',
`remark` varchar(255) NOT NULL DEFAULT '',
`apppay` tinyint(3) NOT NULL DEFAULT '0',
`alipay` varchar(50) NOT NULL DEFAULT '',
`bankname` varchar(50) NOT NULL DEFAULT '',
`bankcard` varchar(50) NOT NULL DEFAULT '',
`realname` varchar(50) NOT NULL DEFAULT '',
`applytype` tinyint(3) NOT NULL DEFAULT '0',
`sendmoney` decimal(10,2) DEFAULT '0.00',
`senddata` text,
`bankopen` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_type` (`type`),
KEY `idx_createtime` (`createtime`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_mergelog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`mergetime` int(11) NOT NULL DEFAULT '0',
`openid_a` varchar(30) NOT NULL,
`openid_b` varchar(30) NOT NULL,
`mid_a` int(11) NOT NULL,
`mid_b` int(11) NOT NULL,
`detail_a` text,
`detail_b` text,
`detail_c` text,
`fromuniacid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_mid_a` (`mid_a`),
KEY `idx_mid_b` (`mid_b`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_message_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`template_id` varchar(255) DEFAULT '',
`first` text NOT NULL COMMENT '键名',
`firstcolor` varchar(255) DEFAULT '',
`data` text NOT NULL COMMENT '颜色',
`remark` text NOT NULL COMMENT '键值',
`remarkcolor` varchar(255) DEFAULT '',
`url` varchar(255) NOT NULL,
`createtime` int(11) DEFAULT '0',
`sendtimes` int(11) DEFAULT '0',
`sendcount` int(11) DEFAULT '0',
`typecode` varchar(30) DEFAULT '',
`messagetype` tinyint(1) DEFAULT '0',
`send_desc` text,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_message_template_default` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`typecode` varchar(255) DEFAULT NULL,
`uniacid` int(11) DEFAULT NULL,
`templateid` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_message_template_type` (
`id` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`typecode` varchar(255) DEFAULT NULL,
`templatecode` varchar(255) DEFAULT NULL,
`templateid` varchar(255) DEFAULT NULL,
`templatename` varchar(255) DEFAULT NULL,
`content` varchar(1000) DEFAULT NULL,
`showtotaladd` tinyint(1) DEFAULT '0',
`typegroup` varchar(255) DEFAULT '',
`groupname` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_printer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`type` tinyint(3) DEFAULT '0',
`print_data` text,
`createtime` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_printer_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`type` tinyint(3) DEFAULT '0',
`print_title` varchar(255) DEFAULT '',
`print_style` varchar(255) DEFAULT '',
`print_data` text,
`code` varchar(500) DEFAULT '',
`qrcode` varchar(500) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`goodssn` tinyint(1) NOT NULL DEFAULT '0',
`productsn` tinyint(1) NOT NULL DEFAULT '0',
`tel_code_type` tinyint(3) NOT NULL DEFAULT '0',
`ordersn_code_type` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_rank` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(10) unsigned NOT NULL,
`status` tinyint(4) NOT NULL,
`num` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_wxapp_message_template_default` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`typecode` varchar(255) NOT NULL DEFAULT '',
`templateid` varchar(255) NOT NULL DEFAULT '',
`datas` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_member_wxapp_message_template_type` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT '',
`typecode` varchar(255) DEFAULT '',
`templatecode` varchar(255) DEFAULT '',
`templatename` varchar(255) DEFAULT '',
`keyword_id_list` varchar(255) DEFAULT '',
`typegroup` varchar(255) DEFAULT '',
`groupname` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`merchid` int(11) DEFAULT '0',
`username` varchar(255) DEFAULT '',
`pwd` varchar(255) DEFAULT '',
`salt` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`perms` text,
`isfounder` tinyint(3) DEFAULT '0',
`lastip` varchar(255) DEFAULT '',
`lastvisit` varchar(255) DEFAULT '',
`roleid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_merchid` (`merchid`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`advname` varchar(50) DEFAULT NULL,
`link` varchar(255) DEFAULT NULL,
`thumb` varchar(255) DEFAULT NULL,
`displayorder` int(11) DEFAULT NULL,
`enabled` int(11) DEFAULT NULL,
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_banner` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`bannername` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_bill` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`applyno` varchar(255) NOT NULL DEFAULT '',
`merchid` int(11) NOT NULL DEFAULT '0',
`orderids` longtext NOT NULL,
`realprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`realpricerate` decimal(10,2) NOT NULL DEFAULT '0.00',
`finalprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`payrateprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`payrate` decimal(10,2) NOT NULL DEFAULT '0.00',
`money` decimal(10,2) NOT NULL DEFAULT '0.00',
`applytime` int(11) NOT NULL DEFAULT '0',
`checktime` int(11) NOT NULL DEFAULT '0',
`paytime` int(11) NOT NULL DEFAULT '0',
`invalidtime` int(11) NOT NULL DEFAULT '0',
`refusetime` int(11) NOT NULL DEFAULT '0',
`remark` text NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
`ordernum` int(11) NOT NULL DEFAULT '0',
`orderprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`passrealprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`passrealpricerate` decimal(10,2) NOT NULL DEFAULT '0.00',
`passorderids` text NOT NULL,
`passordernum` int(11) NOT NULL DEFAULT '0',
`passorderprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`alipay` varchar(50) NOT NULL DEFAULT '',
`bankname` varchar(50) NOT NULL DEFAULT '',
`bankcard` varchar(50) NOT NULL DEFAULT '',
`applyrealname` varchar(50) NOT NULL DEFAULT '',
`applytype` tinyint(3) NOT NULL DEFAULT '0',
`handpay` tinyint(3) NOT NULL DEFAULT '0',
`creditstatus` tinyint(3) NOT NULL DEFAULT '0',
`creditrate` int(10) NOT NULL DEFAULT '1',
`creditnum` int(10) NOT NULL DEFAULT '0',
`creditmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`passcreditnum` int(10) NOT NULL DEFAULT '0',
`passcreditmoney` decimal(10,2) NOT NULL DEFAULT '0.00',
`isbillcredit` int(10) NOT NULL DEFAULT '0',
`bankopen` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_merchid` (`merchid`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_bill_select` (
`bill_id` int(11) NOT NULL DEFAULT '0',
`order_id` int(11) NOT NULL DEFAULT '0',
UNIQUE KEY `bid_oid` (`bill_id`,`order_id`),
KEY `bid` (`bill_id`),
KEY `oid` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_billo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`billid` int(11) NOT NULL DEFAULT '0',
`orderid` int(11) NOT NULL DEFAULT '0',
`ordermoney` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`catename` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`thumb` varchar(500) DEFAULT '',
`isrecommand` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_category_swipe` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`status` tinyint(1) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`thumb` varchar(500) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_clearing` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
`clearno` varchar(64) NOT NULL DEFAULT '',
`goodsprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`dispatchprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`deductprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`deductcredit2` decimal(10,2) NOT NULL DEFAULT '0.00',
`discountprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`deductenough` decimal(10,2) NOT NULL DEFAULT '0.00',
`merchdeductenough` decimal(10,2) NOT NULL DEFAULT '0.00',
`isdiscountprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`createtime` int(10) unsigned NOT NULL DEFAULT '0',
`starttime` int(10) unsigned NOT NULL DEFAULT '0',
`endtime` int(10) unsigned NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
`realprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`realpricerate` decimal(10,2) NOT NULL DEFAULT '0.00',
`finalprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`remark` varchar(2000) NOT NULL DEFAULT '',
`paytime` int(11) NOT NULL DEFAULT '0',
`payrate` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `merchid` (`merchid`),
KEY `starttime` (`starttime`),
KEY `endtime` (`endtime`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_commission_orderprice` (
`order_id` int(11) unsigned NOT NULL,
`commission_price` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`groupname` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`isdefault` tinyint(1) DEFAULT '0',
`goodschecked` tinyint(1) DEFAULT '0',
`commissionchecked` tinyint(1) DEFAULT '0',
`changepricechecked` tinyint(1) DEFAULT '0',
`finishchecked` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_nav` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`navname` varchar(255) DEFAULT '',
`icon` varchar(255) DEFAULT '',
`url` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_status` (`status`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_notice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`link` varchar(255) DEFAULT '',
`detail` text,
`status` tinyint(3) DEFAULT '0',
`createtime` int(11) DEFAULT NULL,
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_perm_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`uniacid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT '',
`type` varchar(255) DEFAULT '',
`op` text,
`ip` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_createtime` (`createtime`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_merchid` (`merchid`),
KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_perm_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`rolename` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`perms` text,
`deleted` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`status`),
KEY `idx_deleted` (`deleted`),
KEY `merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_reg` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`merchname` varchar(255) DEFAULT '',
`salecate` varchar(255) DEFAULT '',
`desc` varchar(500) DEFAULT '',
`realname` varchar(255) DEFAULT '',
`mobile` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`diyformdata` text,
`diyformfields` text,
`applytime` int(11) DEFAULT '0',
`reason` text,
`uname` varchar(50) NOT NULL DEFAULT '',
`upass` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_saler` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`storeid` int(11) DEFAULT '0',
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`salername` varchar(255) DEFAULT '',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_storeid` (`storeid`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_store` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`storename` varchar(255) DEFAULT '',
`address` varchar(255) DEFAULT '',
`tel` varchar(255) DEFAULT '',
`lat` varchar(255) DEFAULT '',
`lng` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`type` tinyint(1) DEFAULT '0',
`realname` varchar(255) DEFAULT '',
`mobile` varchar(255) DEFAULT '',
`fetchtime` varchar(255) DEFAULT '',
`logo` varchar(255) DEFAULT '',
`saletime` varchar(255) DEFAULT '',
`desc` text,
`displayorder` int(11) DEFAULT '0',
`commission_total` decimal(10,2) DEFAULT NULL,
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`status`),
KEY `idx_merchid` (`merchid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_merch_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`regid` int(11) DEFAULT '0',
`openid` varchar(255) NOT NULL DEFAULT '',
`groupid` int(11) DEFAULT '0',
`merchno` varchar(255) NOT NULL DEFAULT '',
`merchname` varchar(255) NOT NULL DEFAULT '',
`salecate` varchar(255) NOT NULL DEFAULT '',
`desc` varchar(500) NOT NULL DEFAULT '',
`realname` varchar(255) NOT NULL DEFAULT '',
`mobile` varchar(255) NOT NULL DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`accounttime` int(11) DEFAULT '0',
`diyformdata` text,
`diyformfields` text,
`applytime` int(11) DEFAULT '0',
`accounttotal` int(11) DEFAULT '0',
`remark` text,
`jointime` int(11) DEFAULT '0',
`accountid` int(11) DEFAULT '0',
`sets` mediumtext,
`logo` varchar(255) NOT NULL DEFAULT '',
`payopenid` varchar(32) NOT NULL DEFAULT '',
`payrate` decimal(10,2) NOT NULL DEFAULT '0.00',
`isrecommand` tinyint(1) DEFAULT '0',
`cateid` int(11) DEFAULT '0',
`address` varchar(255) DEFAULT '',
`tel` varchar(255) DEFAULT '',
`lat` varchar(255) DEFAULT '',
`lng` varchar(255) DEFAULT '',
`pluginset` text NOT NULL,
`uname` varchar(50) NOT NULL DEFAULT '',
`upass` varchar(255) NOT NULL DEFAULT '',
`maxgoods` int(11) NOT NULL DEFAULT '0',
`iscredit` tinyint(3) NOT NULL DEFAULT '1',
`creditrate` int(10) NOT NULL DEFAULT '1',
`iscreditmoney` int(3) NOT NULL DEFAULT '1',
`can_import` tinyint(3) NOT NULL DEFAULT '0',
`can_edit` tinyint(3) NOT NULL DEFAULT '0',
`apikey` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`status`),
KEY `idx_groupid` (`groupid`),
KEY `idx_regid` (`regid`),
KEY `idx_cateid` (`cateid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_multi_shop` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`uid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT '',
`company` varchar(255) DEFAULT '',
`sales` varchar(255) DEFAULT '',
`starttime` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`applytime` int(11) DEFAULT '0',
`jointime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`refusecontent` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_nav` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`navname` varchar(255) DEFAULT '',
`icon` varchar(255) DEFAULT '',
`url` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`iswxapp` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_status` (`status`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_newstore_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`uniacid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_notice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`link` varchar(255) DEFAULT '',
`detail` text,
`status` tinyint(3) DEFAULT '0',
`createtime` int(11) DEFAULT NULL,
`shopid` int(11) DEFAULT '0',
`iswxapp` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_open_api_app` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`api_key` char(32) NOT NULL DEFAULT '',
`name` varchar(20) NOT NULL DEFAULT '',
`request_count` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
`create_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `idx_api_key` (`api_key`),
KEY `idx_status` (`status`),
KEY `idx_api_key_status` (`api_key`,`status`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_open_api_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`app_id` int(11) NOT NULL DEFAULT '0',
`api_type` tinyint(2) NOT NULL DEFAULT '0',
`request_path` varchar(255) NOT NULL DEFAULT '',
`request_params` text,
`request_status` int(11) NOT NULL DEFAULT '0',
`response_content` text,
`create_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `idx_app_id` (`app_id`),
KEY `idx_shop_id_app_id` (`uniacid`,`app_id`),
KEY `idx_uniacid_app_id` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_open_plugin` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`plugin` varchar(255) NOT NULL,
`key` varchar(100) NOT NULL,
`status` int(1) NOT NULL DEFAULT '1',
`expirtime` int(11) NOT NULL,
`url` varchar(255) NOT NULL,
`domain` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`agentid` int(11) DEFAULT '0',
`ordersn` varchar(30) DEFAULT '',
`price` decimal(10,2) DEFAULT '0.00',
`goodsprice` decimal(10,2) DEFAULT '0.00',
`discountprice` decimal(10,2) DEFAULT '0.00',
`status` tinyint(3) DEFAULT '0',
`paytype` tinyint(1) DEFAULT '0' COMMENT '1为余额2为在线3为到付',
`transid` varchar(30) DEFAULT '0' COMMENT '微信支付单号',
`remark` varchar(1000) DEFAULT '',
`addressid` int(11) DEFAULT '0',
`dispatchprice` decimal(10,2) DEFAULT '0.00',
`dispatchid` int(10) DEFAULT '0',
`createtime` int(10) DEFAULT NULL,
`dispatchtype` tinyint(3) DEFAULT '0',
`carrier` text,
`refundid` int(11) DEFAULT '0',
`iscomment` tinyint(3) DEFAULT '0',
`creditadd` tinyint(3) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
`userdeleted` tinyint(3) DEFAULT '0',
`finishtime` int(11) DEFAULT '0',
`paytime` int(11) DEFAULT '0',
`expresscom` varchar(30) NOT NULL DEFAULT '',
`expresssn` varchar(50) NOT NULL DEFAULT '',
`express` varchar(255) DEFAULT '',
`sendtime` int(11) DEFAULT '0',
`fetchtime` int(11) DEFAULT '0',
`cash` tinyint(3) DEFAULT '0',
`canceltime` int(11) DEFAULT NULL,
`cancelpaytime` int(11) DEFAULT '0',
`refundtime` int(11) DEFAULT '0',
`isverify` tinyint(3) DEFAULT '0',
`verified` tinyint(3) DEFAULT '0',
`verifyopenid` varchar(255) DEFAULT '',
`verifycode` varchar(255) DEFAULT '',
`verifytime` int(11) DEFAULT '0',
`verifystoreid` int(11) DEFAULT '0',
`deductprice` decimal(10,2) DEFAULT '0.00',
`deductcredit` int(10) DEFAULT '0',
`deductcredit2` decimal(10,2) DEFAULT '0.00',
`deductenough` decimal(10,2) DEFAULT '0.00',
`virtual` int(11) DEFAULT '0',
`virtual_info` text,
`virtual_str` text,
`address` text,
`sysdeleted` tinyint(3) DEFAULT '0',
`ordersn2` int(11) DEFAULT '0',
`changeprice` decimal(10,2) DEFAULT '0.00',
`changedispatchprice` decimal(10,2) DEFAULT '0.00',
`oldprice` decimal(10,2) DEFAULT '0.00',
`olddispatchprice` decimal(10,2) DEFAULT '0.00',
`isvirtual` tinyint(3) DEFAULT '0',
`couponid` int(11) DEFAULT '0',
`couponprice` decimal(10,2) DEFAULT '0.00',
`diyformdata` text,
`diyformfields` text,
`diyformid` int(11) DEFAULT '0',
`storeid` int(11) DEFAULT '0',
`closereason` text,
`remarksaler` text,
`printstate` tinyint(1) DEFAULT '0',
`printstate2` tinyint(1) DEFAULT '0',
`address_send` text,
`refundstate` tinyint(3) DEFAULT '0',
`remarkclose` text,
`remarksend` text,
`ismr` int(1) NOT NULL DEFAULT '0',
`isdiscountprice` decimal(10,2) DEFAULT '0.00',
`isvirtualsend` tinyint(1) DEFAULT '0',
`virtualsend_info` text,
`verifyinfo` longtext,
`verifytype` tinyint(1) DEFAULT '0',
`verifycodes` text,
`merchid` int(11) DEFAULT '0',
`invoicename` varchar(255) DEFAULT '',
`ismerch` tinyint(1) DEFAULT '0',
`parentid` int(11) DEFAULT '0',
`isparent` tinyint(1) DEFAULT '0',
`grprice` decimal(10,2) DEFAULT '0.00',
`merchshow` tinyint(1) DEFAULT '0',
`merchdeductenough` decimal(10,2) DEFAULT '0.00',
`couponmerchid` int(11) DEFAULT '0',
`isglobonus` tinyint(3) DEFAULT '0',
`merchapply` tinyint(1) DEFAULT '0',
`isabonus` tinyint(3) DEFAULT '0',
`isborrow` tinyint(3) DEFAULT '0',
`borrowopenid` varchar(100) DEFAULT '',
`merchisdiscountprice` decimal(10,2) DEFAULT '0.00',
`apppay` tinyint(3) NOT NULL DEFAULT '0',
`coupongoodprice` decimal(10,2) DEFAULT '1.00',
`buyagainprice` decimal(10,2) DEFAULT '0.00',
`ispackage` tinyint(3) DEFAULT '0',
`packageid` int(11) DEFAULT '0',
`taskdiscountprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`seckilldiscountprice` decimal(10,2) DEFAULT '0.00',
`verifyendtime` int(11) NOT NULL DEFAULT '0',
`willcancelmessage` tinyint(1) DEFAULT '0',
`sendtype` tinyint(3) NOT NULL DEFAULT '0',
`lotterydiscountprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`contype` tinyint(1) DEFAULT '0',
`wxid` int(11) DEFAULT '0',
`wxcardid` varchar(50) DEFAULT '',
`wxcode` varchar(50) DEFAULT '',
`dispatchkey` varchar(30) NOT NULL DEFAULT '',
`quickid` int(11) NOT NULL DEFAULT '0',
`istrade` tinyint(3) NOT NULL DEFAULT '0',
`isnewstore` tinyint(3) NOT NULL DEFAULT '0',
`liveid` int(11) NOT NULL,
`ordersn_trade` varchar(32) NOT NULL,
`tradestatus` tinyint(1) DEFAULT '0',
`tradepaytype` tinyint(1) NOT NULL,
`tradepaytime` int(11) DEFAULT '0',
`dowpayment` decimal(10,2) NOT NULL DEFAULT '0.00',
`betweenprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`isshare` int(11) NOT NULL DEFAULT '0',
`officcode` varchar(50) NOT NULL DEFAULT '',
`wxapp_prepay_id` varchar(100) DEFAULT NULL,
`iswxappcreate` tinyint(1) DEFAULT '0',
`cashtime` int(11) DEFAULT '0',
`random_code` varchar(4) DEFAULT NULL,
`print_template` text,
`city_express_state` tinyint(1) NOT NULL DEFAULT '0',
`is_cashier` tinyint(3) NOT NULL DEFAULT '0',
`commissionmoney` decimal(10,2) DEFAULT '0.00',
`iscycelbuy` tinyint(3) DEFAULT '0',
`cycelbuy_predict_time` int(11) DEFAULT NULL,
`cycelbuy_periodic` varchar(255) DEFAULT NULL,
`invoice_img` varchar(255) DEFAULT '',
`headsid` int(11) NOT NULL DEFAULT '0',
`dividend` text,
`dividend_applytime` int(11) NOT NULL DEFAULT '0',
`dividend_checktime` int(11) NOT NULL DEFAULT '0',
`dividend_paytime` int(11) NOT NULL DEFAULT '0',
`dividend_invalidtime` int(11) NOT NULL DEFAULT '0',
`dividend_deletetime` int(11) NOT NULL DEFAULT '0',
`dividend_status` tinyint(3) NOT NULL DEFAULT '0',
`dividend_content` text,
`wxapp_allow_subscribe` varchar(255) DEFAULT NULL,
`willcloseverifymessage` int(2) NOT NULL DEFAULT '0',
`is_wxapp` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_shareid` (`agentid`),
KEY `idx_status` (`status`),
KEY `idx_createtime` (`createtime`),
KEY `idx_refundid` (`refundid`),
KEY `idx_paytime` (`paytime`),
KEY `idx_finishtime` (`finishtime`),
KEY `idx_merchid` (`merchid`),
KEY `idx_ordersn` (`ordersn`),
KEY `parentid` (`parentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_buysend` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`credit` float(10,2) DEFAULT '0.00',
`money` decimal(10,2) DEFAULT '0.00',
`createtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_orderid` (`orderid`),
KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`goodsid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '',
`nickname` varchar(50) DEFAULT '',
`headimgurl` varchar(255) DEFAULT '',
`level` tinyint(3) DEFAULT '0',
`content` varchar(255) DEFAULT '',
`images` text,
`createtime` int(11) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
`append_content` varchar(255) DEFAULT '',
`append_images` text,
`reply_content` varchar(255) DEFAULT '',
`reply_images` text,
`append_reply_content` varchar(255) DEFAULT '',
`append_reply_images` text,
`istop` tinyint(3) DEFAULT '0',
`checked` tinyint(3) NOT NULL DEFAULT '0',
`replychecked` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_openid` (`openid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`goodsid` int(11) DEFAULT '0',
`price` decimal(10,2) DEFAULT '0.00',
`total` int(11) DEFAULT '1',
`optionid` int(10) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`optionname` text,
`commission1` text COMMENT '0',
`applytime1` int(11) DEFAULT '0',
`checktime1` int(10) DEFAULT '0',
`paytime1` int(11) DEFAULT '0',
`invalidtime1` int(11) DEFAULT '0',
`deletetime1` int(11) DEFAULT '0',
`status1` tinyint(3) DEFAULT '0' COMMENT '申请状态,-2删除-1无效0未申请1申请2审核通过 3已打款',
`content1` text,
`commission2` text,
`applytime2` int(11) DEFAULT '0',
`checktime2` int(10) DEFAULT '0',
`paytime2` int(11) DEFAULT '0',
`invalidtime2` int(11) DEFAULT '0',
`deletetime2` int(11) DEFAULT '0',
`status2` tinyint(3) DEFAULT '0' COMMENT '申请状态,-2删除-1无效0未申请1申请2审核通过 3已打款',
`content2` text,
`commission3` text,
`applytime3` int(11) DEFAULT '0',
`checktime3` int(10) DEFAULT '0',
`paytime3` int(11) DEFAULT '0',
`invalidtime3` int(11) DEFAULT '0',
`deletetime3` int(11) DEFAULT '0',
`status3` tinyint(3) DEFAULT '0' COMMENT '申请状态,-2删除-1无效0未申请1申请2审核通过 3已打款',
`content3` text,
`realprice` decimal(10,2) DEFAULT '0.00',
`goodssn` varchar(255) DEFAULT '',
`productsn` varchar(255) DEFAULT '',
`nocommission` tinyint(3) DEFAULT '0',
`changeprice` decimal(10,2) DEFAULT '0.00',
`oldprice` decimal(10,2) DEFAULT '0.00',
`commissions` text,
`diyformdata` text,
`diyformfields` text,
`diyformdataid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`diyformid` int(11) DEFAULT '0',
`rstate` tinyint(3) DEFAULT '0',
`refundtime` int(11) DEFAULT '0',
`printstate` int(11) NOT NULL DEFAULT '0',
`printstate2` int(11) NOT NULL DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`parentorderid` int(11) DEFAULT '0',
`merchsale` tinyint(3) NOT NULL DEFAULT '0',
`isdiscountprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`canbuyagain` tinyint(1) DEFAULT '0',
`seckill` tinyint(3) DEFAULT '0',
`seckill_taskid` int(11) DEFAULT '0',
`seckill_roomid` int(11) DEFAULT '0',
`seckill_timeid` int(11) DEFAULT '0',
`sendtype` tinyint(3) NOT NULL DEFAULT '0',
`expresscom` varchar(30) NOT NULL,
`expresssn` varchar(50) NOT NULL,
`express` varchar(255) NOT NULL,
`sendtime` int(11) NOT NULL,
`finishtime` int(11) NOT NULL,
`remarksend` text NOT NULL,
`prohibitrefund` tinyint(3) NOT NULL DEFAULT '0',
`storeid` varchar(255) NOT NULL,
`trade_time` int(11) NOT NULL DEFAULT '0',
`optime` varchar(30) NOT NULL,
`tdate_time` int(11) NOT NULL DEFAULT '0',
`dowpayment` decimal(10,2) NOT NULL DEFAULT '0.00',
`peopleid` int(11) NOT NULL DEFAULT '0',
`esheetprintnum` int(11) NOT NULL DEFAULT '0',
`ordercode` varchar(30) NOT NULL DEFAULT '',
`title` varchar(255) DEFAULT NULL,
`consume` text,
`single_refundid` int(11) NOT NULL DEFAULT '0',
`single_refundstate` tinyint(3) NOT NULL DEFAULT '0',
`single_refundtime` int(11) NOT NULL DEFAULT '0',
`fullbackid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_orderid` (`orderid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_applytime1` (`applytime1`),
KEY `idx_checktime1` (`checktime1`),
KEY `idx_status1` (`status1`),
KEY `idx_applytime2` (`applytime2`),
KEY `idx_checktime2` (`checktime2`),
KEY `idx_status2` (`status2`),
KEY `idx_applytime3` (`applytime3`),
KEY `idx_invalidtime1` (`invalidtime1`),
KEY `idx_checktime3` (`checktime3`),
KEY `idx_invalidtime2` (`invalidtime2`),
KEY `idx_invalidtime3` (`invalidtime3`),
KEY `idx_status3` (`status3`),
KEY `idx_paytime1` (`paytime1`),
KEY `idx_paytime2` (`paytime2`),
KEY `idx_paytime3` (`paytime3`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_peerpay` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`orderid` int(11) NOT NULL DEFAULT '0',
`peerpay_type` tinyint(1) NOT NULL DEFAULT '0',
`peerpay_price` decimal(10,2) NOT NULL DEFAULT '0.00',
`peerpay_maxprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`peerpay_realprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`peerpay_selfpay` decimal(10,2) NOT NULL DEFAULT '0.00',
`peerpay_message` varchar(500) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT '0',
`createtime` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_peerpay_payinfo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) NOT NULL DEFAULT '0',
`uid` int(11) NOT NULL DEFAULT '0',
`uname` varchar(255) NOT NULL DEFAULT '',
`usay` varchar(500) NOT NULL DEFAULT '',
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`createtime` int(11) NOT NULL DEFAULT '0',
`headimg` varchar(255) DEFAULT NULL,
`refundstatus` tinyint(1) NOT NULL DEFAULT '0',
`refundprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`tid` varchar(255) NOT NULL DEFAULT '',
`openid` varchar(255) NOT NULL DEFAULT '',
`paytype` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_print` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`status` tinyint(3) DEFAULT '0',
`sid` tinyint(3) DEFAULT '0',
`foid` tinyint(3) DEFAULT '0',
`oid` int(11) DEFAULT '0',
`pid` int(11) DEFAULT '0',
`uniacid` int(11) DEFAULT '0',
`addtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_query` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`out_trade_no` varchar(30) DEFAULT '',
`transaction_id` varchar(60) DEFAULT '',
`total_fee` decimal(10,2) DEFAULT '0.00',
`time_end` int(11) DEFAULT '0',
`status` tinyint(4) NOT NULL DEFAULT '0',
`create_time` int(11) DEFAULT '0',
`apply_time` int(11) NOT NULL DEFAULT '0',
`check_time` int(11) DEFAULT NULL,
`withdraw_time` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`out_trade_no`),
KEY `idx_shareid` (`transaction_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_refund` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`refundno` varchar(255) DEFAULT '',
`price` varchar(255) DEFAULT '',
`reason` varchar(255) DEFAULT '',
`images` text,
`content` text,
`createtime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0' COMMENT '0申请 1 通过 2 驳回',
`reply` text,
`refundtype` tinyint(3) DEFAULT '0',
`realprice` decimal(10,2) DEFAULT '0.00',
`refundtime` int(11) DEFAULT '0',
`orderprice` decimal(10,2) DEFAULT '0.00',
`applyprice` decimal(10,2) DEFAULT '0.00',
`imgs` text,
`rtype` tinyint(3) DEFAULT '0',
`refundaddress` text,
`message` text,
`express` varchar(100) DEFAULT '',
`expresscom` varchar(100) DEFAULT '',
`expresssn` varchar(100) DEFAULT '',
`operatetime` int(11) DEFAULT '0',
`sendtime` int(11) DEFAULT '0',
`returntime` int(11) DEFAULT '0',
`rexpress` varchar(100) DEFAULT '',
`rexpresscom` varchar(100) DEFAULT '',
`rexpresssn` varchar(100) DEFAULT '',
`refundaddressid` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`ordergoodsids` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_createtime` (`createtime`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_single_refund` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
`ordergoodsid` int(11) DEFAULT '0',
`refundno` varchar(255) DEFAULT '',
`price` varchar(255) DEFAULT '',
`reason` varchar(255) DEFAULT '',
`images` text,
`content` text,
`createtime` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`reply` text,
`refundtype` tinyint(3) DEFAULT '0',
`realprice` decimal(10,2) DEFAULT '0.00',
`refundtime` int(11) DEFAULT '0',
`ordergoodsrealprice` decimal(10,2) DEFAULT '0.00',
`applyprice` decimal(10,2) DEFAULT '0.00',
`imgs` text,
`rtype` tinyint(3) DEFAULT '0',
`refundaddress` text,
`message` text,
`express` varchar(100) DEFAULT '',
`expresscom` varchar(100) DEFAULT '',
`expresssn` varchar(100) DEFAULT '',
`operatetime` int(11) DEFAULT '0',
`sendtime` int(11) DEFAULT '0',
`returntime` int(11) DEFAULT '0',
`rexpress` varchar(100) DEFAULT '',
`rexpresscom` varchar(100) DEFAULT '',
`rexpresssn` varchar(100) DEFAULT '',
`refundaddressid` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`tradetype` tinyint(3) NOT NULL DEFAULT '0',
`issuporder` tinyint(3) DEFAULT '0',
`suptype` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_createtime` (`createtime`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_order_withdraw_apply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`apply_ids` text NOT NULL,
`create_time` int(11) NOT NULL,
`uniacid` int(11) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '0',
`openid` varchar(60) NOT NULL DEFAULT '',
`id_number` varchar(30) NOT NULL,
`real_name` varchar(60) NOT NULL,
`total_money` decimal(10,2) NOT NULL DEFAULT '0.00',
`check_money` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_package` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL,
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`freight` decimal(10,2) NOT NULL DEFAULT '0.00',
`thumb` varchar(255) NOT NULL,
`starttime` int(11) NOT NULL DEFAULT '0',
`endtime` int(11) NOT NULL DEFAULT '0',
`goodsid` varchar(255) NOT NULL,
`cash` tinyint(3) NOT NULL DEFAULT '0',
`share_title` varchar(255) NOT NULL,
`share_icon` varchar(255) NOT NULL,
`share_desc` varchar(500) NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
`deleted` tinyint(3) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
`dispatchtype` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_package_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`pid` int(11) NOT NULL,
`goodsid` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`thumb` varchar(255) NOT NULL,
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`option` varchar(255) NOT NULL,
`goodssn` varchar(255) NOT NULL,
`productsn` varchar(255) NOT NULL,
`hasoption` tinyint(3) NOT NULL DEFAULT '0',
`marketprice` decimal(10,2) DEFAULT '0.00',
`packageprice` decimal(10,2) DEFAULT '0.00',
`commission1` decimal(10,2) DEFAULT '0.00',
`commission2` decimal(10,2) DEFAULT '0.00',
`commission3` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_package_goods_option` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`goodsid` int(11) NOT NULL DEFAULT '0',
`optionid` int(11) NOT NULL DEFAULT '0',
`pid` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL,
`packageprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`marketprice` decimal(10,2) NOT NULL DEFAULT '0.00',
`commission1` decimal(10,2) NOT NULL DEFAULT '0.00',
`commission2` decimal(10,2) NOT NULL DEFAULT '0.00',
`commission3` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_payment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`type` tinyint(2) NOT NULL DEFAULT '0',
`appid` varchar(255) DEFAULT '',
`mch_id` varchar(50) NOT NULL DEFAULT '',
`apikey` varchar(50) NOT NULL DEFAULT '',
`sub_appid` varchar(50) DEFAULT '',
`sub_appsecret` varchar(50) DEFAULT '',
`sub_mch_id` varchar(50) DEFAULT '',
`cert_file` text,
`key_file` text,
`root_file` text,
`is_raw` tinyint(1) DEFAULT '0',
`createtime` int(10) unsigned DEFAULT '0',
`paytype` tinyint(3) NOT NULL DEFAULT '0',
`alitype` tinyint(3) NOT NULL DEFAULT '0',
`alipay_sec` text NOT NULL,
`qpay_signtype` tinyint(1) NOT NULL DEFAULT '0',
`app_qpay_public_key` text NOT NULL,
`app_qpay_private_key` text NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_pc_adv` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL,
`advname` varchar(255) NOT NULL,
`title` varchar(255) DEFAULT NULL,
`src` varchar(255) NOT NULL,
`alt` varchar(255) DEFAULT NULL,
`enabled` tinyint(3) unsigned NOT NULL,
`link` varchar(255) DEFAULT NULL,
`width` int(11) unsigned NOT NULL,
`height` int(11) unsigned NOT NULL,
`settings` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_pc_browse_history` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`uid` int(11) DEFAULT '0',
`history` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_pc_goods` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`temp_id` varchar(11) NOT NULL DEFAULT '0',
`uniacid` varchar(11) NOT NULL,
`title` varchar(50) NOT NULL,
`import_image` varchar(255) NOT NULL,
`import_url` varchar(255) NOT NULL,
`goods_type` tinyint(1) NOT NULL,
`goods_info` varchar(2000) NOT NULL,
`top_image` varchar(255) NOT NULL,
`top_url` varchar(255) NOT NULL,
`bottom_image` varchar(255) NOT NULL,
`bottom_url` varchar(255) NOT NULL,
`sort` int(20) NOT NULL,
`status` int(1) NOT NULL DEFAULT '0',
`create_time` varchar(11) NOT NULL,
`goodsid_text` text NOT NULL,
`description` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_pc_link` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL,
`linkname` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL,
`status` tinyint(3) unsigned NOT NULL DEFAULT '1',
`displayorder` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_pc_menu` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned NOT NULL,
`type` int(11) unsigned DEFAULT '0',
`displayorder` int(11) unsigned DEFAULT '0',
`title` varchar(255) DEFAULT '',
`link` varchar(255) DEFAULT '',
`enabled` tinyint(3) unsigned DEFAULT '1',
`createtime` int(11) unsigned DEFAULT NULL,
`status` tinyint(3) unsigned DEFAULT '1',
`create_time` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_pc_slide` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) unsigned DEFAULT '0',
`type` int(11) unsigned DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`backcolor` varchar(255) DEFAULT NULL,
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
`shopid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_pc_template` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`status` tinyint(1) DEFAULT NULL,
`setting` text NOT NULL,
`create_time` int(11) NOT NULL DEFAULT '0',
`update_time` int(11) NOT NULL DEFAULT '0',
`uniacid` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_title` (`title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_perm_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT '0',
`uniacid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT '',
`type` varchar(255) DEFAULT '',
`op` text,
`createtime` int(11) DEFAULT '0',
`ip` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uid` (`uid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_perm_plugin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`acid` int(11) DEFAULT '0',
`uid` int(11) DEFAULT '0',
`type` tinyint(3) DEFAULT '0',
`plugins` text,
`coms` text,
`datas` text,
PRIMARY KEY (`id`),
KEY `idx_uid` (`uid`),
KEY `idx_acid` (`acid`),
KEY `idx_type` (`type`),
KEY `idx_uniacid` (`acid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_perm_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`rolename` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`perms` text,
`deleted` tinyint(3) DEFAULT '0',
`perms2` text,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`status`),
KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_perm_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`uid` int(11) DEFAULT '0',
`username` varchar(255) DEFAULT '',
`password` varchar(255) DEFAULT '',
`roleid` int(11) DEFAULT '0',
`status` int(11) DEFAULT '0',
`perms` text,
`deleted` tinyint(3) DEFAULT '0',
`realname` varchar(255) DEFAULT '',
`mobile` varchar(255) DEFAULT '',
`perms2` text,
`openid` varchar(50) DEFAULT NULL,
`openid_wa` varchar(50) DEFAULT NULL,
`member_nick` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_uid` (`uid`),
KEY `idx_roleid` (`roleid`),
KEY `idx_status` (`status`),
KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_plugin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`displayorder` int(11) DEFAULT '0',
`identity` varchar(50) DEFAULT '',
`name` varchar(50) DEFAULT '',
`version` varchar(10) DEFAULT '',
`author` varchar(20) DEFAULT '',
`status` int(11) DEFAULT '0',
`category` varchar(255) DEFAULT '',
`iscom` tinyint(3) DEFAULT '0',
`desc` text,
`deprecated` tinyint(3) DEFAULT '0',
`isv2` tinyint(3) DEFAULT '0',
`thumb` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_identity` (`identity`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_polyapi_key` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
`appkey` varchar(200) NOT NULL DEFAULT '',
`token` varchar(200) NOT NULL DEFAULT '',
`appsecret` varchar(200) NOT NULL DEFAULT '',
`createtime` int(11) NOT NULL DEFAULT '0',
`updatetime` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_appkey` (`appkey`),
KEY `idx_token` (`token`),
KEY `idx_appsecret` (`appsecret`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_poster` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`type` tinyint(3) DEFAULT '0' COMMENT '1 首页 2 小店 3 商城 4 自定义',
`title` varchar(255) DEFAULT '',
`bg` varchar(255) DEFAULT '',
`data` text,
`keyword` varchar(255) DEFAULT '',
`times` int(11) DEFAULT '0',
`follows` int(11) DEFAULT '0',
`isdefault` tinyint(3) DEFAULT '0',
`resptitle` varchar(255) DEFAULT '',
`respthumb` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`respdesc` varchar(255) DEFAULT '',
`respurl` varchar(255) DEFAULT '',
`waittext` varchar(255) DEFAULT '',
`oktext` varchar(255) DEFAULT '',
`subcredit` int(11) DEFAULT '0',
`submoney` decimal(10,2) DEFAULT '0.00',
`reccredit` int(11) DEFAULT '0',
`recmoney` decimal(10,2) DEFAULT '0.00',
`paytype` tinyint(1) NOT NULL DEFAULT '0',
`scantext` varchar(255) DEFAULT '',
`subtext` varchar(255) DEFAULT '',
`beagent` tinyint(3) DEFAULT '0',
`bedown` tinyint(3) DEFAULT '0',
`isopen` tinyint(3) DEFAULT '0',
`opentext` varchar(255) DEFAULT '',
`openurl` varchar(255) DEFAULT '',
`templateid` varchar(255) DEFAULT '',
`subpaycontent` text,
`recpaycontent` varchar(255) DEFAULT '',
`entrytext` varchar(255) DEFAULT '',
`reccouponid` int(11) DEFAULT '0',
`reccouponnum` int(11) DEFAULT '0',
`subcouponid` int(11) DEFAULT '0',
`subcouponnum` int(11) DEFAULT '0',
`keyword2` varchar(255) DEFAULT '',
`resptype` tinyint(3) DEFAULT '0',
`resptext` text,
`resptext11` text,
`reward_totle` varchar(500) DEFAULT '',
`ismembergroup` tinyint(3) DEFAULT '0',
`membergroupid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`),
KEY `idx_times` (`times`),
KEY `idx_isdefault` (`isdefault`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_poster_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`posterid` int(11) DEFAULT '0',
`from_openid` varchar(255) DEFAULT '',
`subcredit` int(11) DEFAULT '0',
`submoney` decimal(10,2) DEFAULT '0.00',
`reccredit` int(11) DEFAULT '0',
`recmoney` decimal(10,2) DEFAULT '0.00',
`createtime` int(11) DEFAULT '0',
`reccouponid` int(11) DEFAULT '0',
`reccouponnum` int(11) DEFAULT '0',
`subcouponid` int(11) DEFAULT '0',
`subcouponnum` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_posterid` (`posterid`),
KEY `idx_from_openid` (`from_openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_poster_qr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`acid` int(10) unsigned NOT NULL,
`openid` varchar(100) NOT NULL DEFAULT '',
`type` tinyint(3) DEFAULT '0',
`sceneid` int(11) DEFAULT '0',
`mediaid` varchar(255) DEFAULT '',
`ticket` varchar(250) NOT NULL,
`url` varchar(80) NOT NULL,
`createtime` int(10) unsigned NOT NULL,
`goodsid` int(11) DEFAULT '0',
`qrimg` varchar(1000) DEFAULT '',
`scenestr` varchar(255) DEFAULT '',
`posterid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_acid` (`acid`),
KEY `idx_sceneid` (`sceneid`),
KEY `idx_type` (`type`),
KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_poster_scan` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`posterid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`from_openid` varchar(255) DEFAULT '',
`scantime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_posterid` (`posterid`),
KEY `idx_scantime` (`scantime`),
KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_postera` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`type` tinyint(3) DEFAULT '0' COMMENT '1 首页 2 小店 3 商城 4 自定义',
`days` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`bg` varchar(255) DEFAULT '',
`data` text,
`keyword` varchar(255) DEFAULT '',
`isdefault` tinyint(3) DEFAULT '0',
`resptitle` varchar(255) DEFAULT '',
`respthumb` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`respdesc` varchar(255) DEFAULT '',
`respurl` varchar(255) DEFAULT '',
`waittext` varchar(255) DEFAULT '',
`oktext` varchar(255) DEFAULT '',
`subcredit` int(11) DEFAULT '0',
`submoney` decimal(10,2) DEFAULT '0.00',
`reccredit` int(11) DEFAULT '0',
`recmoney` decimal(10,2) DEFAULT '0.00',
`scantext` varchar(255) DEFAULT '',
`subtext` varchar(255) DEFAULT '',
`beagent` tinyint(3) DEFAULT '0',
`bedown` tinyint(3) DEFAULT '0',
`isopen` tinyint(3) DEFAULT '0',
`opentext` varchar(255) DEFAULT '',
`openurl` varchar(255) DEFAULT '',
`paytype` tinyint(1) NOT NULL DEFAULT '0',
`subpaycontent` text,
`recpaycontent` varchar(255) DEFAULT '',
`templateid` varchar(255) DEFAULT '',
`entrytext` varchar(255) DEFAULT '',
`reccouponid` int(11) DEFAULT '0',
`reccouponnum` int(11) DEFAULT '0',
`subcouponid` int(11) DEFAULT '0',
`subcouponnum` int(11) DEFAULT '0',
`timestart` int(11) DEFAULT '0',
`timeend` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`goodsid` int(11) DEFAULT '0',
`keyword2` varchar(255) DEFAULT '',
`resptype` tinyint(3) DEFAULT '0',
`resptext` text,
`starttext` varchar(255) DEFAULT '',
`endtext` varchar(255) DEFAULT NULL,
`testflag` tinyint(1) DEFAULT '0',
`reward_totle` varchar(500) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`),
KEY `idx_isdefault` (`isdefault`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_postera_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`posterid` int(11) DEFAULT '0',
`from_openid` varchar(255) DEFAULT '',
`subcredit` int(11) DEFAULT '0',
`submoney` decimal(10,2) DEFAULT '0.00',
`reccredit` int(11) DEFAULT '0',
`recmoney` decimal(10,2) DEFAULT '0.00',
`createtime` int(11) DEFAULT '0',
`reccouponid` int(11) DEFAULT '0',
`reccouponnum` int(11) DEFAULT '0',
`subcouponid` int(11) DEFAULT '0',
`subcouponnum` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_posteraid` (`posterid`),
KEY `idx_from_openid` (`from_openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_postera_qr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`acid` int(10) unsigned NOT NULL,
`openid` varchar(100) NOT NULL DEFAULT '',
`posterid` int(11) DEFAULT '0',
`type` tinyint(3) DEFAULT '0',
`sceneid` int(11) DEFAULT '0',
`mediaid` varchar(255) DEFAULT '',
`ticket` varchar(250) NOT NULL,
`url` varchar(80) NOT NULL,
`createtime` int(10) unsigned NOT NULL,
`goodsid` int(11) DEFAULT '0',
`qrimg` varchar(1000) DEFAULT '',
`expire` int(11) DEFAULT '0',
`endtime` int(11) DEFAULT '0',
`qrtime` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_acid` (`acid`),
KEY `idx_sceneid` (`sceneid`),
KEY `idx_type` (`type`),
KEY `idx_posterid` (`posterid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_print` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`status` tinyint(3) DEFAULT '0',
`name` varchar(200) DEFAULT '',
`print_no` varchar(200) DEFAULT '',
`key` varchar(200) DEFAULT '',
`print_nums` tinyint(3) DEFAULT '0',
`uniacid` int(11) DEFAULT '0',
`sid` tinyint(3) DEFAULT '0',
`print_type` tinyint(3) DEFAULT '0',
`qrcode_link` varchar(200) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_qa_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_qa_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(50) DEFAULT NULL,
`thumb` varchar(255) DEFAULT NULL,
`displayorder` tinyint(3) unsigned DEFAULT '0',
`enabled` tinyint(1) DEFAULT '1',
`isrecommand` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_enabled` (`enabled`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_qa_question` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`cate` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`keywords` varchar(255) NOT NULL DEFAULT '',
`content` mediumtext NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
`isrecommand` tinyint(3) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
`createtime` int(11) NOT NULL DEFAULT '0',
`lastedittime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_qa_set` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`showmember` tinyint(3) NOT NULL DEFAULT '0',
`showtype` tinyint(3) NOT NULL DEFAULT '0',
`keyword` varchar(255) NOT NULL DEFAULT '',
`enter_title` varchar(255) NOT NULL DEFAULT '',
`enter_img` varchar(255) NOT NULL DEFAULT '',
`enter_desc` varchar(255) NOT NULL DEFAULT '',
`share` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_unaicid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_queue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`channel` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
`job` blob NOT NULL,
`pushed_at` int(11) NOT NULL,
`ttr` int(11) NOT NULL,
`delay` int(11) NOT NULL DEFAULT '0',
`priority` int(11) unsigned NOT NULL DEFAULT '1024',
`reserved_at` int(11) DEFAULT NULL,
`attempt` int(11) DEFAULT NULL,
`done_at` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `channel` (`channel`(191)),
KEY `reserved_at` (`reserved_at`),
KEY `priority` (`priority`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_quick` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`merchid` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) DEFAULT NULL,
`keyword` varchar(255) DEFAULT NULL,
`datas` mediumtext,
`cart` tinyint(3) NOT NULL DEFAULT '0',
`createtime` int(11) DEFAULT NULL,
`lasttime` int(11) DEFAULT NULL,
`share_title` varchar(255) DEFAULT NULL,
`share_desc` varchar(255) DEFAULT NULL,
`share_icon` varchar(255) DEFAULT NULL,
`enter_title` varchar(255) DEFAULT NULL,
`enter_desc` varchar(255) DEFAULT NULL,
`enter_icon` varchar(255) DEFAULT NULL,
`type` tinyint(3) DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_quick_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`merchid` int(11) NOT NULL DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_enabled` (`enabled`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_quick_cart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`quickid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(100) DEFAULT '',
`goodsid` int(11) DEFAULT '0',
`total` int(11) DEFAULT '0',
`marketprice` decimal(10,2) DEFAULT '0.00',
`deleted` tinyint(1) DEFAULT '0',
`optionid` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`diyformdataid` int(11) DEFAULT NULL,
`diyformdata` text,
`diyformfields` text,
`diyformid` int(11) DEFAULT '0',
`selected` tinyint(1) DEFAULT '1',
`merchid` int(11) DEFAULT '0',
`selectedadd` tinyint(1) DEFAULT '1',
PRIMARY KEY (`id`),
KEY `idx_deleted` (`deleted`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_merchid` (`merchid`),
KEY `idx_openid` (`openid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_refund_address` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(50) DEFAULT '0',
`title` varchar(20) DEFAULT '',
`name` varchar(20) DEFAULT '',
`tel` varchar(20) DEFAULT '',
`mobile` varchar(11) DEFAULT '',
`province` varchar(30) DEFAULT '',
`city` varchar(30) DEFAULT '',
`area` varchar(30) DEFAULT '',
`address` varchar(300) DEFAULT '',
`isdefault` tinyint(1) DEFAULT '0',
`zipcode` varchar(255) DEFAULT '',
`content` text,
`deleted` tinyint(1) DEFAULT '0',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_openid` (`openid`),
KEY `idx_isdefault` (`isdefault`),
KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sale_coupon` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT '',
`type` tinyint(3) DEFAULT '0',
`ckey` decimal(10,2) DEFAULT '0.00',
`cvalue` decimal(10,2) DEFAULT '0.00',
`nums` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_createtime` (`createtime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sale_coupon_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`couponid` int(11) DEFAULT '0',
`gettime` int(11) DEFAULT '0',
`gettype` tinyint(3) DEFAULT '0',
`usedtime` int(11) DEFAULT '0',
`orderid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_couponid` (`couponid`),
KEY `idx_gettime` (`gettime`),
KEY `idx_gettype` (`gettype`),
KEY `idx_usedtime` (`usedtime`),
KEY `idx_orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_saler` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`storeid` int(11) DEFAULT '0',
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`salername` varchar(255) DEFAULT '',
`username` varchar(50) DEFAULT '',
`pwd` varchar(255) DEFAULT '',
`salt` varchar(255) DEFAULT '',
`lastvisit` varchar(255) DEFAULT '',
`lastip` varchar(255) DEFAULT '',
`isfounder` tinyint(3) DEFAULT '0',
`mobile` varchar(255) DEFAULT '',
`getmessage` tinyint(1) DEFAULT '0',
`getnotice` tinyint(1) DEFAULT '0',
`roleid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_storeid` (`storeid`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_saler_verify_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`storeid` int(11) DEFAULT '0' COMMENT '店铺id',
`uniacid` int(11) DEFAULT '0' COMMENT '公众号id',
`openid` varchar(255) DEFAULT '' COMMENT '核销员openid',
`saler_id` int(11) NOT NULL DEFAULT '0' COMMENT '核销员id',
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
`verify_time` int(11) NOT NULL DEFAULT '0' COMMENT '核销时间',
`type` tinyint(2) DEFAULT '0' COMMENT '0是常规1是计时计次',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_uniacid` (`uniacid`) USING BTREE,
KEY `index_openid` (`openid`) USING HASH,
KEY `index_type` (`type`) USING HASH
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_seckill_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_enabled` (`enabled`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_seckill_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_seckill_task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cateid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`enabled` tinyint(3) DEFAULT '0',
`page_title` varchar(255) DEFAULT '',
`share_title` varchar(255) DEFAULT '',
`share_desc` varchar(255) DEFAULT '',
`share_icon` varchar(255) DEFAULT '',
`tag` varchar(10) DEFAULT '',
`closesec` int(11) DEFAULT '0',
`oldshow` tinyint(3) DEFAULT '0',
`times` text,
`createtime` int(11) DEFAULT '0',
`overtimes` tinyint(2) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`enabled`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_seckill_task_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`taskid` int(11) DEFAULT '0',
`roomid` int(11) DEFAULT '0',
`timeid` int(11) DEFAULT '0',
`goodsid` int(11) DEFAULT '0',
`optionid` int(11) DEFAULT '0',
`price` decimal(10,2) DEFAULT '0.00',
`total` int(11) DEFAULT '0',
`maxbuy` int(11) DEFAULT '0',
`totalmaxbuy` int(11) DEFAULT '0',
`commission1` decimal(10,2) DEFAULT '0.00',
`commission2` decimal(10,2) DEFAULT '0.00',
`commission3` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_goodsid` (`goodsid`),
KEY `idx_optionid` (`optionid`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_taskid` (`taskid`),
KEY `idx_roomid` (`roomid`),
KEY `idx_time` (`timeid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_seckill_task_room` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`taskid` int(11) DEFAULT '0',
`title` varchar(255) DEFAULT '',
`enabled` tinyint(3) DEFAULT '0',
`page_title` varchar(255) DEFAULT '',
`share_title` varchar(255) DEFAULT '',
`share_desc` varchar(255) DEFAULT '',
`share_icon` varchar(255) DEFAULT '',
`oldshow` tinyint(3) DEFAULT '0',
`tag` varchar(10) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`diypage` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_taskid` (`taskid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_seckill_task_time` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`taskid` int(11) DEFAULT '0',
`time` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sendticket` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`cpid` varchar(200) NOT NULL,
`expiration` int(11) NOT NULL DEFAULT '0',
`starttime` int(11) DEFAULT NULL,
`endtime` int(11) DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`createtime` int(11) NOT NULL,
`title` varchar(255) NOT NULL DEFAULT '新人礼包',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sendticket_draw` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`cpid` varchar(50) NOT NULL,
`openid` varchar(200) NOT NULL,
`createtime` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `openid` (`openid`),
KEY `cpid` (`cpid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sendticket_share` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`sharetitle` varchar(255) NOT NULL,
`shareicon` varchar(255) DEFAULT NULL,
`sharedesc` varchar(255) DEFAULT NULL,
`expiration` int(11) NOT NULL DEFAULT '0',
`starttime` int(11) DEFAULT NULL,
`endtime` int(11) DEFAULT NULL,
`paycpid1` int(11) DEFAULT NULL,
`paycpid2` int(11) DEFAULT NULL,
`paycpid3` int(11) DEFAULT NULL,
`paycpnum1` int(11) DEFAULT NULL,
`paycpnum2` int(11) DEFAULT NULL,
`paycpnum3` int(11) DEFAULT NULL,
`sharecpid1` int(11) DEFAULT NULL,
`sharecpid2` int(11) DEFAULT NULL,
`sharecpid3` int(11) DEFAULT NULL,
`sharecpnum1` int(11) DEFAULT NULL,
`sharecpnum2` int(11) DEFAULT NULL,
`sharecpnum3` int(11) DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`createtime` int(11) NOT NULL,
`order` int(11) DEFAULT NULL,
`enough` decimal(10,2) DEFAULT NULL,
`issync` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sign_records` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL DEFAULT '0',
`openid` varchar(50) NOT NULL DEFAULT '',
`credit` int(11) NOT NULL DEFAULT '0',
`log` varchar(255) DEFAULT '',
`type` tinyint(3) NOT NULL DEFAULT '0',
`day` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_time` (`time`),
KEY `idx_type` (`type`),
KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sign_set` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`iscenter` tinyint(3) NOT NULL DEFAULT '0',
`iscreditshop` tinyint(3) NOT NULL DEFAULT '0',
`keyword` varchar(255) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL DEFAULT '',
`thumb` varchar(255) NOT NULL DEFAULT '',
`desc` varchar(255) NOT NULL DEFAULT '',
`isopen` tinyint(3) NOT NULL DEFAULT '0',
`signold` tinyint(3) NOT NULL DEFAULT '0',
`signold_price` int(11) NOT NULL DEFAULT '0',
`signold_type` tinyint(3) NOT NULL DEFAULT '0',
`textsign` varchar(255) NOT NULL DEFAULT '',
`textsignold` varchar(255) NOT NULL DEFAULT '',
`textsigned` varchar(255) NOT NULL DEFAULT '',
`textsignforget` varchar(255) NOT NULL DEFAULT '',
`maincolor` varchar(20) NOT NULL DEFAULT '',
`cycle` tinyint(3) NOT NULL DEFAULT '0',
`reward_default_first` int(11) NOT NULL DEFAULT '0',
`reward_default_day` int(11) NOT NULL DEFAULT '0',
`reword_order` text NOT NULL,
`reword_sum` text NOT NULL,
`reword_special` text NOT NULL,
`sign_rule` text NOT NULL,
`share` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sign_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(255) NOT NULL DEFAULT '',
`order` int(11) NOT NULL DEFAULT '0',
`orderday` int(11) NOT NULL DEFAULT '0',
`sum` int(11) NOT NULL DEFAULT '0',
`signdate` varchar(10) DEFAULT '',
`isminiprogram` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sms` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`type` varchar(10) NOT NULL DEFAULT '',
`template` tinyint(3) NOT NULL DEFAULT '0',
`smstplid` varchar(255) NOT NULL DEFAULT '',
`smssign` varchar(255) NOT NULL DEFAULT '',
`content` varchar(100) NOT NULL DEFAULT '',
`data` text NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sms_set` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`juhe` tinyint(3) NOT NULL DEFAULT '0',
`juhe_key` varchar(255) NOT NULL DEFAULT '',
`dayu` tinyint(3) NOT NULL DEFAULT '0',
`dayu_key` varchar(255) NOT NULL DEFAULT '',
`dayu_secret` varchar(255) NOT NULL DEFAULT '',
`emay` tinyint(3) NOT NULL DEFAULT '0',
`emay_url` varchar(255) NOT NULL DEFAULT '',
`emay_sn` varchar(255) NOT NULL DEFAULT '',
`emay_pw` varchar(255) NOT NULL DEFAULT '',
`emay_sk` varchar(255) NOT NULL DEFAULT '',
`emay_phost` varchar(255) NOT NULL DEFAULT '',
`emay_pport` int(11) NOT NULL DEFAULT '0',
`emay_puser` varchar(255) NOT NULL DEFAULT '',
`emay_ppw` varchar(255) NOT NULL DEFAULT '',
`emay_out` int(11) NOT NULL DEFAULT '0',
`emay_outresp` int(11) NOT NULL DEFAULT '30',
`emay_warn` decimal(10,2) NOT NULL DEFAULT '0.00',
`emay_mobile` varchar(11) NOT NULL DEFAULT '',
`emay_warn_time` int(11) NOT NULL DEFAULT '0',
`aliyun` tinyint(3) NOT NULL DEFAULT '0',
`aliyun_appcode` varchar(255) NOT NULL,
`aliyun_new` tinyint(3) NOT NULL DEFAULT '0',
`aliyun_new_keyid` varchar(255) NOT NULL DEFAULT '',
`aliyun_new_keysecret` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_board` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`cid` int(11) DEFAULT '0',
`title` varchar(50) DEFAULT '',
`logo` varchar(255) DEFAULT '',
`desc` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
`showgroups` text,
`showlevels` text,
`postgroups` text,
`postlevels` text,
`showagentlevels` text,
`postagentlevels` text,
`postcredit` int(11) DEFAULT '0',
`replycredit` int(11) DEFAULT '0',
`bestcredit` int(11) DEFAULT '0',
`bestboardcredit` int(11) DEFAULT '0',
`notagent` tinyint(3) DEFAULT '0',
`notagentpost` tinyint(3) DEFAULT '0',
`topcredit` int(11) DEFAULT '0',
`topboardcredit` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`noimage` tinyint(3) DEFAULT '0',
`novoice` tinyint(3) DEFAULT '0',
`needfollow` tinyint(3) DEFAULT '0',
`needpostfollow` tinyint(3) DEFAULT '0',
`share_title` varchar(255) DEFAULT '',
`share_icon` varchar(255) DEFAULT '',
`share_desc` varchar(255) DEFAULT '',
`keyword` varchar(255) DEFAULT '',
`isrecommand` tinyint(3) DEFAULT '0',
`banner` varchar(255) DEFAULT '',
`needcheck` tinyint(3) DEFAULT '0',
`needcheckmanager` tinyint(3) DEFAULT '0',
`needcheckreply` int(11) DEFAULT '0',
`needcheckreplymanager` int(11) DEFAULT '0',
`showsnslevels` text,
`postsnslevels` text,
`showpartnerlevels` text,
`postpartnerlevels` text,
`notpartner` tinyint(3) DEFAULT '0',
`notpartnerpost` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_cid` (`cid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_board_follow` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`bid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT NULL,
`createtime` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_bid` (`bid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(50) DEFAULT NULL,
`thumb` varchar(255) DEFAULT NULL,
`displayorder` tinyint(3) unsigned DEFAULT '0',
`enabled` tinyint(1) DEFAULT '1',
`advimg` varchar(255) DEFAULT '',
`advurl` varchar(500) DEFAULT '',
`isrecommand` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_enabled` (`enabled`),
KEY `idx_isrecommand` (`isrecommand`),
KEY `idx_displayorder` (`displayorder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_complain` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`type` tinyint(3) NOT NULL,
`postsid` int(11) NOT NULL DEFAULT '0',
`defendant` varchar(255) NOT NULL DEFAULT '0',
`complainant` varchar(255) NOT NULL DEFAULT '0',
`complaint_type` int(10) NOT NULL DEFAULT '0',
`complaint_text` text NOT NULL,
`images` text NOT NULL,
`createtime` int(11) NOT NULL DEFAULT '0',
`checkedtime` int(11) NOT NULL DEFAULT '0',
`checked` tinyint(3) NOT NULL DEFAULT '0',
`checked_note` varchar(255) NOT NULL,
`deleted` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_complaincate` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_level` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`levelname` varchar(255) DEFAULT '',
`credit` int(11) DEFAULT '0',
`enabled` tinyint(3) DEFAULT '0',
`post` int(11) DEFAULT '0',
`color` varchar(255) DEFAULT '',
`bg` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_enabled` (`enabled`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_like` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`pid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_pid` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_manage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`bid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`enabled` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_bid` (`bid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_member` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT NULL,
`level` int(11) DEFAULT '0',
`createtime` int(11) DEFAULT '0',
`credit` int(11) DEFAULT '0',
`sign` varchar(255) DEFAULT '',
`isblack` tinyint(3) DEFAULT '0',
`notupgrade` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sns_post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`bid` int(11) DEFAULT '0',
`pid` int(11) DEFAULT '0',
`rpid` int(11) DEFAULT '0',
`openid` varchar(255) DEFAULT '',
`avatar` varchar(255) DEFAULT '',
`nickname` varchar(255) DEFAULT '',
`title` varchar(50) DEFAULT '',
`content` text,
`images` text,
`voice` varchar(255) DEFAULT NULL,
`createtime` int(11) DEFAULT '0',
`replytime` int(11) DEFAULT '0',
`credit` int(11) DEFAULT '0',
`views` int(11) DEFAULT '0',
`islock` tinyint(1) DEFAULT '0',
`istop` tinyint(1) DEFAULT '0',
`isboardtop` tinyint(1) DEFAULT '0',
`isbest` tinyint(1) DEFAULT '0',
`isboardbest` tinyint(3) DEFAULT '0',
`deleted` tinyint(3) DEFAULT '0',
`deletedtime` int(11) DEFAULT '0',
`checked` tinyint(3) DEFAULT NULL,
`checktime` int(11) DEFAULT '0',
`isadmin` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_bid` (`bid`),
KEY `idx_pid` (`pid`),
KEY `idx_createtime` (`createtime`),
KEY `idx_islock` (`islock`),
KEY `idx_istop` (`istop`),
KEY `idx_isboardtop` (`isboardtop`),
KEY `idx_isbest` (`isbest`),
KEY `idx_deleted` (`deleted`),
KEY `idx_deletetime` (`deletedtime`),
KEY `idx_checked` (`checked`),
KEY `idx_rpid` (`rpid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_store` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`storename` varchar(255) DEFAULT '',
`address` varchar(255) DEFAULT '',
`tel` varchar(255) DEFAULT '',
`lat` varchar(255) DEFAULT '',
`lng` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
`type` tinyint(1) DEFAULT '0',
`realname` varchar(255) DEFAULT '',
`mobile` varchar(255) DEFAULT '',
`fetchtime` varchar(255) DEFAULT '',
`logo` varchar(255) DEFAULT '',
`saletime` varchar(255) DEFAULT '',
`desc` text,
`displayorder` int(11) DEFAULT '0',
`order_printer` varchar(500) DEFAULT '',
`order_template` int(11) DEFAULT '0',
`ordertype` varchar(500) DEFAULT '',
`banner` text,
`label` varchar(255) DEFAULT NULL,
`tag` varchar(255) DEFAULT NULL,
`classify` tinyint(1) DEFAULT NULL,
`perms` text,
`citycode` varchar(20) DEFAULT '',
`opensend` tinyint(3) NOT NULL DEFAULT '0',
`province` varchar(30) NOT NULL DEFAULT '',
`city` varchar(30) NOT NULL DEFAULT '',
`area` varchar(30) NOT NULL DEFAULT '',
`provincecode` varchar(30) NOT NULL DEFAULT '',
`areacode` varchar(30) NOT NULL DEFAULT '',
`diypage` int(11) NOT NULL DEFAULT '0',
`diypage_ispage` tinyint(3) NOT NULL DEFAULT '0',
`diypage_list` text,
`storegroupid` int(11) DEFAULT NULL,
`cates` text,
`pcates` text,
`tcates` text,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_supplier_apply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL COMMENT '供应商id',
`uniacid` int(11) NOT NULL,
`type` int(11) NOT NULL COMMENT '1手动2微信',
`applysn` varchar(255) NOT NULL COMMENT '提现单号',
`apply_money` int(11) NOT NULL COMMENT '申请金额',
`apply_time` int(11) NOT NULL COMMENT '申请时间',
`status` tinyint(3) NOT NULL COMMENT '0为申请状态1为完成状态',
`finish_time` int(11) NOT NULL COMMENT '完成时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_sysset` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`sets` longtext,
`plugins` longtext,
`sec` longtext,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`url` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`module` varchar(255) DEFAULT '',
`status` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT '',
`author` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`content` text,
`createtime` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`cate` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_banner` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`url` varchar(255) DEFAULT '',
`createtime` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`background` varchar(10) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_case` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`qr` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
`cate` int(11) DEFAULT '0',
`description` varchar(255) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_casecategory` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`status` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`status` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_company_article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT '',
`author` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`content` text,
`createtime` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`cate` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_company_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`status` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_copyright` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`copyright` text,
`bgcolor` varchar(255) DEFAULT '',
`ismanage` tinyint(3) DEFAULT '0',
`logo` varchar(255) DEFAULT '',
`title` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_copyright_notice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT '',
`author` varchar(255) DEFAULT '',
`content` text,
`createtime` int(11) DEFAULT '0',
`displayorder` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_guestbook` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`content` varchar(255) NOT NULL DEFAULT '',
`nickname` varchar(255) NOT NULL DEFAULT '',
`createtime` int(11) DEFAULT NULL,
`email` varchar(255) NOT NULL DEFAULT '',
`clientip` varchar(64) NOT NULL DEFAULT '',
`mobile` varchar(11) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_link` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`url` varchar(255) NOT NULL DEFAULT '',
`thumb` varchar(255) NOT NULL DEFAULT '',
`displayorder` int(11) DEFAULT NULL,
`status` tinyint(3) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_plugingrant_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_displayorder` (`displayorder`),
KEY `idx_enabled` (`enabled`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_plugingrant_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`logno` varchar(50) DEFAULT NULL,
`code` varchar(255) DEFAULT NULL,
`uniacid` int(11) NOT NULL DEFAULT '0',
`pluginid` int(11) NOT NULL DEFAULT '0',
`identity` varchar(50) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`month` int(10) NOT NULL DEFAULT '0',
`permendtime` int(10) NOT NULL DEFAULT '0',
`permlasttime` int(10) NOT NULL DEFAULT '0',
`isperm` tinyint(3) NOT NULL DEFAULT '0',
`createtime` int(10) NOT NULL DEFAULT '0',
`deleted` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_plugingrant_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`logno` varchar(50) DEFAULT NULL,
`code` varchar(255) DEFAULT NULL,
`uniacid` int(11) NOT NULL DEFAULT '0',
`username` varchar(255) DEFAULT NULL,
`pluginid` varchar(255) DEFAULT NULL,
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`month` int(11) NOT NULL DEFAULT '0',
`createtime` int(10) NOT NULL DEFAULT '0',
`paystatus` tinyint(3) NOT NULL DEFAULT '0',
`paytime` int(10) NOT NULL DEFAULT '0',
`paytype` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_plugingrant_package` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pluginid` varchar(255) NOT NULL DEFAULT '',
`text` varchar(255) DEFAULT NULL,
`thumb` varchar(1000) DEFAULT NULL,
`data` text NOT NULL,
`state` tinyint(3) NOT NULL DEFAULT '0',
`rec` tinyint(3) NOT NULL DEFAULT '0',
`desc` varchar(255) DEFAULT NULL,
`content` text NOT NULL,
`displayorder` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_plugingrant_plugin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pluginid` int(11) NOT NULL DEFAULT '0',
`thumb` varchar(1000) NOT NULL,
`data` text,
`state` tinyint(3) NOT NULL DEFAULT '0',
`content` text NOT NULL,
`sales` int(11) NOT NULL DEFAULT '0',
`createtime` int(10) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
`plugintype` tinyint(3) NOT NULL DEFAULT '0',
`name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_plugingrant_setting` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`com` varchar(1000) NOT NULL DEFAULT '',
`adv` varchar(1000) NOT NULL,
`plugin` varchar(1000) NOT NULL,
`customer` varchar(50) NOT NULL DEFAULT '0',
`contact` text NOT NULL,
`servertime` varchar(255) DEFAULT NULL,
`weixin` tinyint(3) NOT NULL DEFAULT '0',
`appid` varchar(255) DEFAULT NULL,
`mchid` varchar(255) DEFAULT NULL,
`apikey` varchar(255) DEFAULT NULL,
`alipay` tinyint(3) NOT NULL,
`account` varchar(255) DEFAULT NULL,
`partner` varchar(255) DEFAULT NULL,
`secret` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_setting` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(10) DEFAULT NULL,
`background` varchar(10) DEFAULT '',
`casebanner` varchar(255) DEFAULT '',
`contact` longtext,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_system_site` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(32) NOT NULL DEFAULT '',
`content` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`title` varchar(255) NOT NULL DEFAULT '',
`type` int(11) NOT NULL,
`starttime` int(11) NOT NULL,
`endtime` int(11) NOT NULL,
`dotime` int(11) NOT NULL DEFAULT '0',
`donetime` int(11) NOT NULL DEFAULT '0',
`timelimit` float(11,1) NOT NULL,
`keyword` varchar(255) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT '0',
`explain` text,
`require_data` text NOT NULL,
`reward_data` text NOT NULL,
`period` int(11) NOT NULL DEFAULT '0',
`repeat` int(11) NOT NULL DEFAULT '0',
`maxtimes` int(11) NOT NULL DEFAULT '0',
`everyhours` float(11,1) NOT NULL DEFAULT '0.0',
`logo` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_adv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`advname` varchar(50) DEFAULT '',
`link` varchar(255) DEFAULT '',
`thumb` varchar(255) DEFAULT '',
`displayorder` int(11) DEFAULT '0',
`enabled` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_default` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`data` text,
`addtime` int(11) NOT NULL DEFAULT '0',
`bgimg` varchar(255) NOT NULL DEFAULT '',
`open` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_extension` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taskname` varchar(255) NOT NULL DEFAULT '',
`taskclass` varchar(25) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT '0',
`classify` varchar(255) NOT NULL DEFAULT '',
`classify_name` varchar(255) NOT NULL DEFAULT '',
`verb` varchar(255) NOT NULL DEFAULT '',
`unit` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_extension_join` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`title` varchar(255) NOT NULL DEFAULT '',
`uid` int(11) NOT NULL,
`taskid` int(11) NOT NULL,
`openid` varchar(255) NOT NULL,
`require_data` text NOT NULL,
`progress_data` text NOT NULL,
`reward_data` text NOT NULL,
`completetime` int(11) NOT NULL DEFAULT '0',
`pickuptime` int(11) NOT NULL,
`endtime` int(11) NOT NULL,
`dotime` int(11) NOT NULL DEFAULT '0',
`rewarded` text NOT NULL,
`logo` varchar(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_join` (
`join_id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`join_user` varchar(100) NOT NULL DEFAULT '',
`task_id` int(11) NOT NULL DEFAULT '0',
`task_type` tinyint(1) NOT NULL DEFAULT '0',
`needcount` int(11) NOT NULL DEFAULT '0',
`completecount` int(11) NOT NULL DEFAULT '0',
`reward_data` text,
`is_reward` tinyint(1) NOT NULL DEFAULT '0',
`failtime` int(11) NOT NULL DEFAULT '0',
`addtime` int(11) DEFAULT '0',
PRIMARY KEY (`join_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_joiner` (
`complete_id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`task_user` varchar(100) NOT NULL DEFAULT '',
`joiner_id` varchar(100) NOT NULL DEFAULT '',
`join_id` int(11) NOT NULL DEFAULT '0',
`task_id` int(11) NOT NULL DEFAULT '0',
`task_type` tinyint(1) NOT NULL DEFAULT '0',
`join_status` tinyint(1) NOT NULL DEFAULT '1',
`addtime` int(11) DEFAULT NULL,
PRIMARY KEY (`complete_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_list` (
`status` tinyint(1) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`title` char(50) NOT NULL DEFAULT '',
`image` varchar(255) NOT NULL DEFAULT '',
`type` varchar(50) NOT NULL DEFAULT '',
`starttime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`endtime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`demand` int(11) NOT NULL DEFAULT '0',
`requiregoods` text NOT NULL,
`picktype` tinyint(1) NOT NULL DEFAULT '0',
`stop_type` tinyint(1) NOT NULL DEFAULT '0',
`stop_limit` int(11) NOT NULL DEFAULT '0',
`stop_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`stop_cycle` tinyint(1) NOT NULL DEFAULT '0',
`repeat_type` tinyint(1) NOT NULL DEFAULT '0',
`repeat_interval` int(11) NOT NULL DEFAULT '0',
`repeat_cycle` tinyint(1) NOT NULL DEFAULT '0',
`reward` text NOT NULL,
`followreward` text NOT NULL,
`goods_limit` int(11) NOT NULL DEFAULT '0',
`notice` text NOT NULL,
`design_data` text NOT NULL,
`design_bg` varchar(255) NOT NULL DEFAULT '',
`native_data` text NOT NULL,
`native_data2` text,
`native_data3` text,
`reward2` text,
`reward3` text,
`level2` int(11) NOT NULL DEFAULT '0',
`level3` int(11) NOT NULL DEFAULT '0',
`member_group` text,
`auto_pick` tinyint(1) NOT NULL DEFAULT '0',
`keyword_pick` varchar(20) NOT NULL DEFAULT '',
`verb` varchar(255) DEFAULT '',
`unit` varchar(255) DEFAULT '',
`member_level` int(11) NOT NULL DEFAULT '0',
`poster_version` varchar(255) NOT NULL DEFAULT '',
`we7_rule_keyword_id` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_passive` (`picktype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(100) NOT NULL DEFAULT '',
`from_openid` varchar(100) NOT NULL DEFAULT '',
`join_id` int(11) NOT NULL DEFAULT '0',
`taskid` int(11) DEFAULT '0',
`task_type` tinyint(1) NOT NULL DEFAULT '0',
`subdata` text,
`recdata` text,
`createtime` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_poster` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`days` int(11) NOT NULL DEFAULT '0',
`title` varchar(255) DEFAULT NULL,
`bg` varchar(255) DEFAULT '',
`data` text,
`keyword` varchar(255) DEFAULT NULL,
`resptype` tinyint(1) NOT NULL DEFAULT '0',
`resptext` text,
`resptitle` varchar(255) DEFAULT NULL,
`respthumb` varchar(255) DEFAULT NULL,
`respdesc` varchar(255) DEFAULT NULL,
`respurl` varchar(255) DEFAULT NULL,
`createtime` int(11) DEFAULT NULL,
`waittext` varchar(255) DEFAULT NULL,
`oktext` varchar(255) DEFAULT NULL,
`scantext` varchar(255) DEFAULT NULL,
`beagent` tinyint(1) NOT NULL DEFAULT '0',
`bedown` tinyint(1) NOT NULL DEFAULT '0',
`timestart` int(11) DEFAULT NULL,
`timeend` int(11) DEFAULT NULL,
`is_repeat` tinyint(1) DEFAULT '0',
`getposter` varchar(255) DEFAULT NULL,
`status` tinyint(1) DEFAULT NULL,
`starttext` varchar(255) DEFAULT NULL,
`endtext` varchar(255) DEFAULT NULL,
`reward_data` text,
`needcount` int(11) NOT NULL DEFAULT '0',
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
`poster_type` tinyint(1) DEFAULT '1',
`reward_days` int(11) DEFAULT '0',
`titleicon` text,
`poster_banner` text,
`is_goods` tinyint(1) DEFAULT '0',
`autoposter` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_poster_qr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`acid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(100) NOT NULL,
`posterid` int(11) NOT NULL DEFAULT '0',
`type` tinyint(1) NOT NULL DEFAULT '0',
`sceneid` int(11) NOT NULL DEFAULT '0',
`mediaid` varchar(255) DEFAULT NULL,
`ticket` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL,
`createtime` int(11) DEFAULT NULL,
`qrimg` varchar(1000) DEFAULT NULL,
`expire` int(11) DEFAULT NULL,
`endtime` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_qr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`openid` varchar(100) NOT NULL DEFAULT '',
`recordid` int(11) NOT NULL DEFAULT '0',
`sceneid` varchar(255) NOT NULL DEFAULT '',
`mediaid` varchar(255) NOT NULL DEFAULT '',
`ticket` varchar(255) NOT NULL DEFAULT '',
`poster_version` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `recordid` (`recordid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`taskid` int(11) NOT NULL DEFAULT '0',
`tasktitle` varchar(255) NOT NULL,
`taskimage` varchar(255) NOT NULL DEFAULT '',
`tasktype` varchar(50) NOT NULL DEFAULT '',
`task_progress` int(11) NOT NULL DEFAULT '0',
`task_demand` int(11) NOT NULL DEFAULT '0',
`openid` char(50) NOT NULL DEFAULT '',
`nickname` varchar(255) NOT NULL DEFAULT '',
`picktime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`stoptime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`finishtime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`reward_data` text NOT NULL,
`followreward_data` text NOT NULL,
`design_data` text NOT NULL,
`design_bg` varchar(255) NOT NULL DEFAULT '',
`require_goods` varchar(255) NOT NULL DEFAULT '',
`level1` int(11) NOT NULL DEFAULT '0',
`reward_data1` text NOT NULL,
`level2` int(11) NOT NULL DEFAULT '0',
`reward_data2` text NOT NULL,
`member_group` text,
`auto_pick` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `taskid` (`taskid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_reward` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`taskid` int(11) NOT NULL DEFAULT '0',
`tasktitle` char(50) NOT NULL DEFAULT '',
`tasktype` varchar(50) NOT NULL DEFAULT '',
`taskowner` char(50) NOT NULL DEFAULT '',
`ownernickname` char(50) NOT NULL DEFAULT '',
`recordid` int(11) NOT NULL DEFAULT '0',
`nickname` char(50) NOT NULL DEFAULT '',
`headimg` varchar(255) NOT NULL DEFAULT '',
`openid` char(50) NOT NULL DEFAULT '',
`reward_type` char(10) NOT NULL DEFAULT '',
`reward_title` char(50) NOT NULL DEFAULT '',
`reward_data` decimal(10,2) NOT NULL DEFAULT '0.00',
`get` tinyint(1) NOT NULL DEFAULT '0',
`sent` tinyint(1) NOT NULL DEFAULT '0',
`gettime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`senttime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`isjoiner` tinyint(1) NOT NULL DEFAULT '0',
`price` decimal(10,2) NOT NULL DEFAULT '0.00',
`level` tinyint(1) NOT NULL DEFAULT '0',
`read` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `recordid` (`recordid`),
KEY `taskid` (`taskid`),
KEY `get` (`get`),
KEY `openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_set` (
`uniacid` int(11) NOT NULL DEFAULT '0',
`entrance` tinyint(1) NOT NULL DEFAULT '0',
`keyword` varchar(10) NOT NULL DEFAULT '',
`cover_title` varchar(20) NOT NULL DEFAULT '',
`cover_img` varchar(255) NOT NULL DEFAULT '',
`cover_desc` varchar(255) NOT NULL DEFAULT '',
`msg_pick` text NOT NULL,
`msg_progress` text NOT NULL,
`msg_finish` text NOT NULL,
`msg_follow` text NOT NULL,
`isnew` tinyint(1) NOT NULL DEFAULT '0',
`bg_img` varchar(255) NOT NULL DEFAULT '../addons/ewei_shopv2/plugin/task/static/images/sky.png',
`top_notice` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`uniacid`),
KEY `uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_task_type` (
`id` int(11) NOT NULL,
`type_key` char(20) NOT NULL DEFAULT '',
`type_name` char(10) NOT NULL DEFAULT '',
`description` char(30) NOT NULL DEFAULT '',
`verb` char(11) NOT NULL DEFAULT '',
`numeric` tinyint(1) NOT NULL DEFAULT '0',
`unit` char(10) NOT NULL DEFAULT '',
`goods` tinyint(1) NOT NULL DEFAULT '0',
`theme` char(10) NOT NULL DEFAULT '',
`once` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_touch_loop_list` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`goods_id` int(11) NOT NULL DEFAULT '0',
`content` text NOT NULL,
`thumbs` text,
`sort` int(11) DEFAULT '0',
`credted_at` int(11) DEFAULT '0',
`status` tinyint(3) DEFAULT '1',
`isrecommand` tinyint(3) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `index_uniacid` (`uniacid`),
KEY `index_status` (`status`),
KEY `index_goods_id` (`goods_id`),
KEY `index_isrecommand` (`isrecommand`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_universalform_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`name` varchar(50) DEFAULT NULL,
`merch` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_universalform_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`typeid` int(11) NOT NULL DEFAULT '0',
`cid` int(11) DEFAULT '0',
`fields` text NOT NULL,
`universalformfields` text,
`openid` varchar(255) NOT NULL DEFAULT '',
`type` tinyint(2) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_typeid` (`typeid`),
KEY `idx_cid` (`cid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_universalform_temp` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`typeid` int(11) DEFAULT '0',
`cid` int(11) NOT NULL DEFAULT '0',
`universalformfields` text,
`fields` text NOT NULL,
`openid` varchar(255) NOT NULL DEFAULT '',
`type` tinyint(1) DEFAULT '0',
`universalformid` int(11) DEFAULT '0',
`universalformdata` text,
`carrier_realname` varchar(255) DEFAULT '',
`carrier_mobile` varchar(255) DEFAULT '',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_cid` (`cid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_universalform_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`cate` int(11) DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`adpic` varchar(255) NOT NULL DEFAULT '',
`adurl` varchar(255) NOT NULL DEFAULT '',
`fields` text NOT NULL,
`usedata` int(11) NOT NULL DEFAULT '0',
`alldata` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) DEFAULT '1',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_cate` (`cate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_upwxapp_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`type` tinyint(2) DEFAULT '0',
`version` varchar(20) DEFAULT NULL,
`describe` varchar(50) DEFAULT NULL,
`version_time` int(11) DEFAULT NULL,
`is_goods` tinyint(1) DEFAULT '0',
`is_live` tinyint(1) DEFAULT '0',
`is_recharge` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_verifygoods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`openid` varchar(255) DEFAULT NULL,
`orderid` int(11) DEFAULT NULL,
`ordergoodsid` int(11) DEFAULT NULL,
`storeid` int(11) DEFAULT NULL,
`starttime` int(11) DEFAULT NULL,
`limitdays` int(11) DEFAULT NULL,
`limitnum` int(11) DEFAULT NULL,
`used` tinyint(1) DEFAULT '0',
`verifycode` varchar(20) DEFAULT NULL,
`codeinvalidtime` int(11) DEFAULT NULL,
`invalid` tinyint(1) DEFAULT '0',
`getcard` tinyint(1) DEFAULT '0',
`activecard` tinyint(1) DEFAULT '0',
`cardcode` varchar(255) DEFAULT '',
`limittype` tinyint(1) DEFAULT '0',
`limitdate` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `verifycode` (`verifycode`),
KEY `idx_orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_verifygoods_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`verifygoodsid` int(11) DEFAULT NULL,
`salerid` int(11) DEFAULT NULL,
`storeid` int(11) DEFAULT NULL,
`verifynum` int(11) DEFAULT NULL,
`verifydate` int(11) DEFAULT NULL,
`remarks` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `verifygoodsid` (`verifygoodsid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_verifyorder_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`orderid` int(11) DEFAULT NULL,
`salerid` int(11) DEFAULT NULL,
`storeid` int(11) DEFAULT NULL,
`verifytime` int(11) DEFAULT NULL,
`verifyinfo` longtext,
PRIMARY KEY (`id`),
KEY `uniacid` (`uniacid`),
KEY `orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`type` tinyint(3) NOT NULL DEFAULT '0',
`uniacid` int(11) NOT NULL,
`version` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uid` (`uid`),
KEY `idx_version` (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_virtual_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0' COMMENT '所属帐号',
`name` varchar(50) DEFAULT NULL COMMENT '分类名称',
`merchid` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_virtual_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`typeid` int(11) NOT NULL DEFAULT '0' COMMENT '类型id',
`pvalue` varchar(255) DEFAULT '' COMMENT '主键键值',
`fields` text NOT NULL COMMENT '字符集',
`openid` varchar(255) NOT NULL DEFAULT '' COMMENT '使用者openid',
`usetime` int(11) NOT NULL DEFAULT '0' COMMENT '使用时间',
`orderid` int(11) DEFAULT '0',
`ordersn` varchar(255) DEFAULT '',
`price` decimal(10,2) DEFAULT '0.00',
`merchid` int(11) DEFAULT '0',
`createtime` int(11) NOT NULL,
`is_top` tinyint(1) DEFAULT '0',
`sort_time` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_typeid` (`typeid`),
KEY `idx_usetime` (`usetime`),
KEY `idx_orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_virtual_send_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT '0',
`openid` varchar(40) NOT NULL DEFAULT '',
`orderid` tinyint(3) unsigned NOT NULL,
`tag` varchar(20) NOT NULL,
`default` varchar(2000) NOT NULL DEFAULT '',
`cusdefault` varchar(2000) NOT NULL DEFAULT '',
`url` varchar(128) NOT NULL DEFAULT '',
`datas` varchar(2000) NOT NULL DEFAULT '',
`appurl` varchar(128) NOT NULL DEFAULT '',
`status` tinyint(4) NOT NULL DEFAULT '0',
`sendtime` int(11) NOT NULL DEFAULT '0',
`createtime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_virtual_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`cate` int(11) DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名称',
`fields` text NOT NULL COMMENT '字段集',
`usedata` int(11) NOT NULL DEFAULT '0' COMMENT '已用数据',
`alldata` int(11) NOT NULL DEFAULT '0' COMMENT '全部数据',
`merchid` int(11) DEFAULT '0',
`linktext` varchar(50) DEFAULT NULL,
`linkurl` varchar(255) DEFAULT NULL,
`recycled` int(11) NOT NULL DEFAULT '0',
`description` text,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_cate` (`cate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxapp_bind` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`wxapp` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_wxapp` (`wxapp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxapp_page` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`type` tinyint(2) NOT NULL DEFAULT '0',
`name` varchar(255) DEFAULT NULL,
`data` mediumtext,
`createtime` int(11) NOT NULL DEFAULT '0',
`lasttime` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
`isdefault` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`),
KEY `idx_status` (`status`),
KEY `idx_isdefault` (`isdefault`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxapp_poster` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`type` tinyint(3) NOT NULL DEFAULT '0',
`title` varchar(255) DEFAULT NULL,
`thumb` varchar(255) DEFAULT NULL,
`bgimg` varchar(255) DEFAULT NULL,
`data` text,
`createtime` int(11) NOT NULL DEFAULT '0',
`lastedittime` int(11) NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '0',
`displayorder` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_type` (`type`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxapp_startadv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '0',
`name` varchar(255) DEFAULT NULL,
`data` text,
`createtime` int(11) NOT NULL DEFAULT '0',
`lastedittime` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxapp_subscribe` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`type` varchar(20) NOT NULL,
`templateid` varchar(255) NOT NULL,
`createtime` varchar(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxapp_tmessage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`templateid` varchar(50) DEFAULT '',
`datas` text,
`emphasis_keyword` int(11) NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxcard` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`card_id` varchar(255) DEFAULT '0',
`displayorder` int(11) DEFAULT NULL,
`catid` int(11) DEFAULT NULL,
`card_type` varchar(50) DEFAULT NULL,
`logo_url` varchar(255) DEFAULT NULL,
`wxlogourl` varchar(255) DEFAULT NULL,
`brand_name` varchar(255) DEFAULT NULL,
`code_type` varchar(255) DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
`color` varchar(50) DEFAULT NULL,
`notice` varchar(50) DEFAULT NULL,
`service_phone` varchar(50) DEFAULT NULL,
`description` text,
`datetype` varchar(50) DEFAULT NULL,
`begin_timestamp` int(11) DEFAULT NULL,
`end_timestamp` int(11) DEFAULT NULL,
`fixed_term` int(11) DEFAULT NULL,
`fixed_begin_term` int(11) DEFAULT NULL,
`quantity` int(11) DEFAULT NULL,
`total_quantity` varchar(255) DEFAULT NULL,
`use_limit` int(11) DEFAULT NULL,
`get_limit` int(11) DEFAULT NULL,
`use_custom_code` tinyint(1) DEFAULT NULL,
`bind_openid` tinyint(1) DEFAULT NULL,
`can_share` tinyint(1) DEFAULT NULL,
`can_give_friend` tinyint(1) DEFAULT NULL,
`center_title` varchar(20) DEFAULT NULL,
`center_sub_title` varchar(20) DEFAULT NULL,
`center_url` varchar(255) DEFAULT NULL,
`setcustom` tinyint(1) DEFAULT NULL,
`custom_url_name` varchar(20) DEFAULT NULL,
`custom_url_sub_title` varchar(20) DEFAULT NULL,
`custom_url` varchar(255) DEFAULT NULL,
`setpromotion` tinyint(1) DEFAULT NULL,
`promotion_url_name` varchar(20) DEFAULT NULL,
`promotion_url_sub_title` varchar(20) DEFAULT NULL,
`promotion_url` varchar(255) DEFAULT NULL,
`source` varchar(255) DEFAULT NULL,
`can_use_with_other_discount` tinyint(1) DEFAULT NULL,
`setabstract` tinyint(1) DEFAULT NULL,
`abstract` varchar(50) DEFAULT NULL,
`abstractimg` varchar(255) DEFAULT NULL,
`icon_url_list` varchar(255) DEFAULT NULL,
`accept_category` varchar(50) DEFAULT NULL,
`reject_category` varchar(50) DEFAULT NULL,
`least_cost` decimal(10,2) DEFAULT NULL,
`reduce_cost` decimal(10,2) DEFAULT NULL,
`discount` decimal(10,2) DEFAULT NULL,
`limitgoodtype` tinyint(1) DEFAULT '0',
`limitgoodcatetype` tinyint(1) unsigned DEFAULT '0',
`limitgoodcateids` varchar(255) DEFAULT NULL,
`limitgoodids` varchar(255) DEFAULT NULL,
`limitdiscounttype` tinyint(1) unsigned DEFAULT '0',
`merchid` int(11) DEFAULT '0',
`gettype` tinyint(3) DEFAULT NULL,
`islimitlevel` tinyint(1) DEFAULT '0',
`limitmemberlevels` varchar(500) DEFAULT '',
`limitagentlevels` varchar(500) DEFAULT '',
`limitpartnerlevels` varchar(500) DEFAULT '',
`limitaagentlevels` varchar(500) DEFAULT '',
`settitlecolor` tinyint(1) DEFAULT '0',
`titlecolor` varchar(10) DEFAULT '',
`tagtitle` varchar(20) DEFAULT '',
`use_condition` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxlive` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) NOT NULL DEFAULT '0',
`room_id` int(11) NOT NULL DEFAULT '0',
`name` varchar(50) NOT NULL DEFAULT '',
`cover_img` varchar(255) NOT NULL DEFAULT '',
`live_status` tinyint(3) NOT NULL DEFAULT '0',
`local_live_status` tinyint(1) NOT NULL DEFAULT '0',
`start_time` int(11) NOT NULL DEFAULT '0',
`end_time` int(11) NOT NULL DEFAULT '0',
`anchor_name` varchar(20) NOT NULL DEFAULT '',
`anchor_img` varchar(255) NOT NULL DEFAULT '',
`goods_json` text,
`is_top` tinyint(1) NOT NULL DEFAULT '0',
`is_recommend` tinyint(1) NOT NULL DEFAULT '0',
`status` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_start_time` (`start_time`),
KEY `idx_end_time` (`end_time`),
KEY `idx_is_top` (`is_top`),
KEY `idx_is_recommend` (`is_recommend`),
KEY `idx_local_live_status` (`local_live_status`),
KEY `idx_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ims_ewei_shop_wxlive_back` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uniacid` int(11) DEFAULT NULL,
`live_id` int(11) NOT NULL,
`room_id` int(11) NOT NULL,
`expire_time` int(11) DEFAULT NULL,
`create_time` int(11) DEFAULT NULL,
`media_url` varchar(255) DEFAULT NULL,
`show_times` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_uniacid` (`uniacid`),
KEY `idx_roomid` (`room_id`),
KEY `idx_liveid` (`live_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
";
pdo_run($sql);
if(!pdo_fieldexists("ewei_message_mass_sign", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_message_mass_sign", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_sign", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `openid` varchar(50);");
}
if(!pdo_fieldexists("ewei_message_mass_sign", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `nickname` varchar(50);");
}
if(!pdo_fieldexists("ewei_message_mass_sign", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `taskid` int(11);");
}
if(!pdo_fieldexists("ewei_message_mass_sign", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `status` tinyint(1);");
}
if(!pdo_fieldexists("ewei_message_mass_sign", "log")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_sign")." ADD `log` varchar(255);");
}
if(!pdo_fieldexists("ewei_message_mass_task", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_message_mass_task", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "processnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `processnum` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "sendnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `sendnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "messagetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `messagetype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `templateid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "resptitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `resptitle` varchar(255);");
}
if(!pdo_fieldexists("ewei_message_mass_task", "respthumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `respthumb` varchar(255);");
}
if(!pdo_fieldexists("ewei_message_mass_task", "respdesc")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `respdesc` varchar(255);");
}
if(!pdo_fieldexists("ewei_message_mass_task", "respurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `respurl` varchar(255);");
}
if(!pdo_fieldexists("ewei_message_mass_task", "sendlimittype")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `sendlimittype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "send_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `send_openid` text;");
}
if(!pdo_fieldexists("ewei_message_mass_task", "send_level")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `send_level` int(11);");
}
if(!pdo_fieldexists("ewei_message_mass_task", "send_group")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `send_group` int(11);");
}
if(!pdo_fieldexists("ewei_message_mass_task", "send_agentlevel")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `send_agentlevel` int(11);");
}
if(!pdo_fieldexists("ewei_message_mass_task", "customertype")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `customertype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "resdesc2")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `resdesc2` text;");
}
if(!pdo_fieldexists("ewei_message_mass_task", "pagecount")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `pagecount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "successnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `successnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_task", "failnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_task")." ADD `failnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_message_mass_template", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "template_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `template_id` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "first")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `first` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_message_mass_template", "firstcolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `firstcolor` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_message_mass_template", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `remark` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_message_mass_template", "remarkcolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `remarkcolor` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_message_mass_template", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "sendtimes")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `sendtimes` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "sendcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `sendcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "miniprogram")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `miniprogram` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "appid")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `appid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_message_mass_template", "pagepath")) {
pdo_query("ALTER TABLE ".tablename("ewei_message_mass_template")." ADD `pagepath` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_open_farm_advertisement", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_advertisement")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_advertisement", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_advertisement")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_advertisement", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_advertisement")." ADD `name` varchar(8);");
}
if(!pdo_fieldexists("ewei_open_farm_advertisement", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_advertisement")." ADD `logo` text;");
}
if(!pdo_fieldexists("ewei_open_farm_advertisement", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_advertisement")." ADD `url` text;");
}
if(!pdo_fieldexists("ewei_open_farm_advertisement", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_advertisement")." ADD `create_time` datetime NOT NULL;");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `openid` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `name` varchar(32);");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "portrait")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `portrait` text;");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `level` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "experience")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `experience` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "accelerate")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `accelerate` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "egg_stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `egg_stock` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "last_egg_stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `last_egg_stock` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "feed_stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `feed_stock` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "bowl_stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `bowl_stock` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "integral")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `integral` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "feeding_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `feeding_time` datetime;");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "feeding_sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `feeding_sum` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "lay_eggs_eat")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `lay_eggs_eat` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "lay_eggs_sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `lay_eggs_sum` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "eat_sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `eat_sum` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "surprised_guard")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `surprised_guard` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_chicken", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_chicken")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `name` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `url` text;");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "qrcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `qrcode` text;");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `keyword` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `title` text;");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `logo` text;");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "describe")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `describe` text;");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "public_qrcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `public_qrcode` text;");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "force_follow")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `force_follow` enum('1','0') NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_configure", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_configure")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `openid` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `sum` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "use_sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `use_sum` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `status` enum('是','否') NOT NULL DEFAULT '否';");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "receive")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `receive` enum('是','否') NOT NULL DEFAULT '否';");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "use_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `use_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_egg", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_egg")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_grade", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_grade")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_grade", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_grade")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_grade", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_grade")." ADD `level` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_grade", "experience")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_grade")." ADD `experience` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_grade", "accelerate")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_grade")." ADD `accelerate` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_grade", "surprised_guard")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_grade")." ADD `surprised_guard` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_grade", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_grade")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_indicate", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_indicate")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_indicate", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_indicate")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_indicate", "image")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_indicate")." ADD `image` text;");
}
if(!pdo_fieldexists("ewei_open_farm_indicate", "describe")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_indicate")." ADD `describe` text;");
}
if(!pdo_fieldexists("ewei_open_farm_indicate", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_indicate")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `openid` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `nickname` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "order_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `order_id` varchar(128);");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "integral")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `integral` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "egg")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `egg` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "receive")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `receive` enum('是','否') NOT NULL DEFAULT '否';");
}
if(!pdo_fieldexists("ewei_open_farm_integral", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_integral")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_log")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_log")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_log", "category")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_log")." ADD `category` enum('获取优惠券','获取积分','获取鸡蛋','获取饲料','获取道具卡','兑换商品') NOT NULL DEFAULT '获取优惠券';");
}
if(!pdo_fieldexists("ewei_open_farm_log", "describe")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_log")." ADD `describe` text;");
}
if(!pdo_fieldexists("ewei_open_farm_log", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_log")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_market", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_market", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_market", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `title` varchar(8);");
}
if(!pdo_fieldexists("ewei_open_farm_market", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `type` enum('商品','积分') NOT NULL DEFAULT '积分';");
}
if(!pdo_fieldexists("ewei_open_farm_market", "value")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `value` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_market", "egg")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `egg` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_market", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `logo` text;");
}
if(!pdo_fieldexists("ewei_open_farm_market", "number")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `number` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_market", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_market")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_mood", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_mood", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_mood", "background")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood")." ADD `background` text;");
}
if(!pdo_fieldexists("ewei_open_farm_mood", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood")." ADD `logo` text;");
}
if(!pdo_fieldexists("ewei_open_farm_mood", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_mood_image", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood_image")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_mood_image", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood_image")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_mood_image", "picture")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood_image")." ADD `picture` text;");
}
if(!pdo_fieldexists("ewei_open_farm_mood_image", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_mood_image")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_notice", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_notice")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_notice", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_notice")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_notice", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_notice")." ADD `title` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_notice", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_notice")." ADD `content` longtext;");
}
if(!pdo_fieldexists("ewei_open_farm_notice", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_notice")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_order", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_order")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_order", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_order")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_order", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_order")." ADD `openid` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_order", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_order")." ADD `username` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_order", "market_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_order")." ADD `market_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_order", "market_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_order")." ADD `market_title` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_order", "receive")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_order")." ADD `receive` enum('1','0') NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_order", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_order")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_presentation", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_presentation")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_presentation", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_presentation")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_presentation", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_presentation")." ADD `openid` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_presentation", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_presentation")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_open_farm_presentation", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_presentation")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `name` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `logo` text;");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "deposit_max")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `deposit_max` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "day_use_max")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `day_use_max` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "effect")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `effect` enum('进食加速','新单卡','其它') NOT NULL DEFAULT '其它';");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "value")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `value` text;");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "get_category")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `get_category` enum('完成任务','积分兑换','购买商品') NOT NULL DEFAULT '完成任务';");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "get_value")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `get_value` text;");
}
if(!pdo_fieldexists("ewei_open_farm_prop", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_prop")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_reply", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_reply")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_reply", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_reply")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_reply", "brief_introduce")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_reply")." ADD `brief_introduce` text;");
}
if(!pdo_fieldexists("ewei_open_farm_reply", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_reply")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "eat_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `eat_time` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "time_steal")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `time_steal` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "steal_eat_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `steal_eat_time` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "eat_tips")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `eat_tips` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "warehouse")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `warehouse` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "bowl")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `bowl` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "lay_eggs_eat")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `lay_eggs_eat` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "lay_eggs_tips")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `lay_eggs_tips` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "lay_eggs_number_min")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `lay_eggs_number_min` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "lay_eggs_number_max")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `lay_eggs_number_max` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "obtain_feed_max")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `obtain_feed_max` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "exchange_integral_max")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `exchange_integral_max` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "feed_invalid_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `feed_invalid_time` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "egg_invalid_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `egg_invalid_time` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "surprised_invalid_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `surprised_invalid_time` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "eat_experience")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `eat_experience` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "rate")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `rate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "advertisement_max")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `advertisement_max` int(11) unsigned NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "surprised_probability")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `surprised_probability` int(11) unsigned NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "shop")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `shop` text;");
}
if(!pdo_fieldexists("ewei_open_farm_seting", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_seting")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_surprised", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_surprised")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_surprised", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_surprised")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_surprised", "category")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_surprised")." ADD `category` enum('优惠券','积分') NOT NULL DEFAULT '优惠券';");
}
if(!pdo_fieldexists("ewei_open_farm_surprised", "value")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_surprised")." ADD `value` text;");
}
if(!pdo_fieldexists("ewei_open_farm_surprised", "probability")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_surprised")." ADD `probability` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_surprised", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_surprised")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_task", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `logo` text;");
}
if(!pdo_fieldexists("ewei_open_farm_task", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `title` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "feed")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `feed` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "order_feed")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `order_feed` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "money_feed")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `money_feed` decimal(10,2) unsigned NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "goods_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `goods_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "goods_feed")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `goods_feed` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "get_max")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `get_max` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "core")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `core` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "core_feed")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `core_feed` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "member_level")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `member_level` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "member_level_feed")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `member_level_feed` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "start_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `start_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "end_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "category")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `category` enum('签到','任务中心','购买商品','商城下单','会员领取') NOT NULL DEFAULT '签到';");
}
if(!pdo_fieldexists("ewei_open_farm_task", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_task")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_threshold", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_threshold")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_threshold", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_threshold")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_threshold", "free")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_threshold")." ADD `free` enum('1','0');");
}
if(!pdo_fieldexists("ewei_open_farm_threshold", "goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_threshold")." ADD `goods` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_threshold", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_threshold")." ADD `level` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_threshold", "consumption")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_threshold")." ADD `consumption` enum('1','0');");
}
if(!pdo_fieldexists("ewei_open_farm_threshold", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_threshold")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_user", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_user", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `name` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_open_farm_user", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `openid` varchar(56);");
}
if(!pdo_fieldexists("ewei_open_farm_user", "tofakeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `tofakeid` varchar(56);");
}
if(!pdo_fieldexists("ewei_open_farm_user", "follow")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `follow` enum('0','1') NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_open_farm_user", "consume")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `consume` decimal(10,2) unsigned NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_open_farm_user", "parent_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `parent_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user", "portrait")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `portrait` text;");
}
if(!pdo_fieldexists("ewei_open_farm_user", "autograph")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `autograph` text;");
}
if(!pdo_fieldexists("ewei_open_farm_user", "sex")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `sex` enum('男','女') NOT NULL DEFAULT '男';");
}
if(!pdo_fieldexists("ewei_open_farm_user", "birthday")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `birthday` date;");
}
if(!pdo_fieldexists("ewei_open_farm_user", "distribution")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `distribution` enum('0','1') NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_open_farm_user", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "active_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `active_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "active_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `active_name` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "active_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `active_openid` varchar(56);");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "active_tofakeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `active_tofakeid` varchar(56);");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "passive_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `passive_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "passive_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `passive_name` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "passive_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `passive_openid` varchar(56);");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "passive_tofakeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `passive_tofakeid` varchar(56);");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "agree")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `agree` enum('是','等待中','否') NOT NULL DEFAULT '等待中';");
}
if(!pdo_fieldexists("ewei_open_farm_user_friend", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_friend")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_user_prop", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_prop")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_user_prop", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_prop")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_prop", "user_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_prop")." ADD `user_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_prop", "prop_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_prop")." ADD `prop_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_prop", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_prop")." ADD `total` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_prop", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_prop")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `openid` varchar(64);");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "surprised_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `surprised_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `status` enum('是','否') NOT NULL DEFAULT '否';");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "use")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `use` enum('是','否') NOT NULL DEFAULT '否';");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "receive")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `receive` enum('是','否') NOT NULL DEFAULT '否';");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "use_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `use_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_user_surprised", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_surprised")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `uniacid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `openid` varchar(56);");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "task_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `task_id` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "rid")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `rid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "order_sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `order_sum` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "order_money")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `order_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "goods_sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `goods_sum` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `status` enum('进行中','已完成','已领取') NOT NULL DEFAULT '进行中';");
}
if(!pdo_fieldexists("ewei_open_farm_user_task", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_open_farm_user_task")." ADD `create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "billno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `billno` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `paytype` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "year")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `year` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "month")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `month` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "week")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `week` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "ordercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `ordercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "aagentcount1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `aagentcount1` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "aagentcount2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `aagentcount2` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "aagentcount3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `aagentcount3` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney_send1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney_send1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney_pay1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney_pay1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney_send2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney_send2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney_pay2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney_pay2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney_send3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney_send3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "bonusmoney_pay3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `bonusmoney_pay3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `starttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_bill", "confirmtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_bill")." ADD `confirmtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billo", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billo")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_abonus_billo", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billo")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billo", "billid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billo")." ADD `billid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billo", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billo")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billo", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billo")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "billid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `billid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "payno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `payno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `paytype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "bonus1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `bonus1` decimal(10,4) DEFAULT '0.0000';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "bonus2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `bonus2` decimal(10,4) DEFAULT '0.0000';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "bonus3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `bonus3` decimal(10,4) DEFAULT '0.0000';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "money1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `money1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "realmoney1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `realmoney1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "paymoney1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `paymoney1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "money2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `money2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "realmoney2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `realmoney2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "paymoney2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `paymoney2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "money3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `money3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "realmoney3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `realmoney3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "paymoney3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `paymoney3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "chargemoney1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `chargemoney1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "chargemoney2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `chargemoney2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "chargemoney3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `chargemoney3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `reason` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_abonus_billp", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_billp")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "levelname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `levelname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "bonus1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `bonus1` decimal(10,4) DEFAULT '0.0000';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "bonus2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `bonus2` decimal(10,4) DEFAULT '0.0000';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "bonus3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `bonus3` decimal(10,4) DEFAULT '0.0000';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "ordercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `ordercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "bonusmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `bonusmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "downcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `downcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_abonus_level", "commissionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_abonus_level")." ADD `commissionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `openid` varchar(11);");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `orderid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "ordersn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `ordersn` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "isdispose")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `isdispose` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `message` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "ispass")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `ispass` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "isdelete")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `isdelete` tinyint(4) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "isall")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `isall` tinyint(4) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "old_address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `old_address` text;");
}
if(!pdo_fieldexists("ewei_shop_address_applyfor", "cycleid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_address_applyfor")." ADD `cycleid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_adv", "shopid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `shopid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_adv", "iswxapp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_adv")." ADD `iswxapp` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_af_supplier", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_af_supplier")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_af_supplier", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_af_supplier")." ADD `openid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_af_supplier", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_af_supplier")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_af_supplier", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_af_supplier")." ADD `realname` varchar(55) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_af_supplier", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_af_supplier")." ADD `mobile` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_af_supplier", "weixin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_af_supplier")." ADD `weixin` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_af_supplier", "productname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_af_supplier")." ADD `productname` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_area_config", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_area_config")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_area_config", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_area_config")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_area_config", "new_area")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_area_config")." ADD `new_area` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_area_config", "address_street")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_area_config")." ADD `address_street` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_area_config", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_area_config")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_article", "article_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_title` varchar(255) NOT NULL DEFAULT '' COMMENT '文章标题';");
}
if(!pdo_fieldexists("ewei_shop_article", "resp_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `resp_desc` text NOT NULL COMMENT '回复介绍';");
}
if(!pdo_fieldexists("ewei_shop_article", "resp_img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `resp_img` text NOT NULL COMMENT '回复图片';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_content` longtext;");
}
if(!pdo_fieldexists("ewei_shop_article", "article_category")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_category` int(11) NOT NULL DEFAULT '0' COMMENT '文章分类';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_date_v")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_date_v` varchar(20) NOT NULL DEFAULT '' COMMENT '虚拟发布时间';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_date")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_date` varchar(20) NOT NULL DEFAULT '' COMMENT '文章发布时间';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_mp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_mp` varchar(50) NOT NULL DEFAULT '' COMMENT '公众号';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_author")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_author` varchar(20) NOT NULL DEFAULT '' COMMENT '发布作者';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_readnum_v")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_readnum_v` int(11) NOT NULL DEFAULT '0' COMMENT '虚拟阅读量';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_readnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_readnum` int(11) NOT NULL DEFAULT '0' COMMENT '真实阅读量';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_likenum_v")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_likenum_v` int(11) NOT NULL DEFAULT '0' COMMENT '虚拟点赞数';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_likenum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_likenum` int(11) NOT NULL DEFAULT '0' COMMENT '真实点赞数';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_linkurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_linkurl` varchar(300) NOT NULL DEFAULT '' COMMENT '阅读原文链接';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_daynum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_daynum` int(11) NOT NULL DEFAULT '0' COMMENT '每人每天参与次数';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_allnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_allnum` int(11) NOT NULL DEFAULT '0' COMMENT '所有参与次数';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_credit` int(11) NOT NULL DEFAULT '0' COMMENT '增加y积分';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '增加z余额';");
}
if(!pdo_fieldexists("ewei_shop_article", "page_set_option_nocopy")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `page_set_option_nocopy` int(1) NOT NULL DEFAULT '0' COMMENT '页面禁止复制url';");
}
if(!pdo_fieldexists("ewei_shop_article", "page_set_option_noshare_tl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `page_set_option_noshare_tl` int(1) NOT NULL DEFAULT '0' COMMENT '页面禁止分享至朋友圈';");
}
if(!pdo_fieldexists("ewei_shop_article", "page_set_option_noshare_msg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `page_set_option_noshare_msg` int(1) NOT NULL DEFAULT '0' COMMENT '页面禁止发送给好友';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '页面关键字';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_report")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_report` int(1) NOT NULL DEFAULT '0' COMMENT '举报按钮';");
}
if(!pdo_fieldexists("ewei_shop_article", "product_advs_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `product_advs_type` int(1) NOT NULL DEFAULT '0' COMMENT '营销显示产品';");
}
if(!pdo_fieldexists("ewei_shop_article", "product_advs_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `product_advs_title` varchar(255) NOT NULL DEFAULT '' COMMENT '营销产品标题';");
}
if(!pdo_fieldexists("ewei_shop_article", "product_advs_more")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `product_advs_more` varchar(255) NOT NULL DEFAULT '' COMMENT '推广产品底部标题';");
}
if(!pdo_fieldexists("ewei_shop_article", "product_advs_link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `product_advs_link` varchar(255) NOT NULL DEFAULT '' COMMENT '推广产品底部链接';");
}
if(!pdo_fieldexists("ewei_shop_article", "product_advs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `product_advs` text NOT NULL COMMENT '营销商品';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_state")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_state` int(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "network_attachment")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `network_attachment` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_keyword2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_keyword2` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_credittotal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_credittotal` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_moneytotal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_moneytotal` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_credit2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_credit2` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_money2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_money2` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_creditm")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_creditm` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_moneym")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_moneym` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_creditm2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_creditm2` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_rule_moneym2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_rule_moneym2` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_readtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_readtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_areas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_areas` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_hasendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_hasendtime` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_advance")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_advance` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_virtualadd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_virtualadd` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_visit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_visit` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article", "article_visit_level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_visit_level` text;");
}
if(!pdo_fieldexists("ewei_shop_article", "article_visit_tip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article")." ADD `article_visit_tip` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_article_category", "category_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_category")." ADD `category_name` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名称';");
}
if(!pdo_fieldexists("ewei_shop_article_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_category")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_category")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_category", "isshow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_category")." ADD `isshow` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "articleid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `articleid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `nickname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "headimgurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `headimgurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `content` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "reply_createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `reply_createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_comment", "reply_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_comment")." ADD `reply_content` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_article_log", "aid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_log")." ADD `aid` int(11) NOT NULL DEFAULT '0' COMMENT '文章id';");
}
if(!pdo_fieldexists("ewei_shop_article_log", "read")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_log")." ADD `read` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_log", "like")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_log")." ADD `like` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_log")." ADD `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '用户openid';");
}
if(!pdo_fieldexists("ewei_shop_article_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_log")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_report", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_report")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_article_report", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_report")." ADD `mid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_report", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_report")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_report", "aid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_report")." ADD `aid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_report", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_report")." ADD `cate` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_report", "cons")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_report")." ADD `cons` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_report", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_report")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_share", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_share")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_article_share", "aid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_share")." ADD `aid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_share", "share_user")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_share")." ADD `share_user` int(11) NOT NULL DEFAULT '0' COMMENT '分享人';");
}
if(!pdo_fieldexists("ewei_shop_article_share", "click_user")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_share")." ADD `click_user` int(11) NOT NULL DEFAULT '0' COMMENT '点击人';");
}
if(!pdo_fieldexists("ewei_shop_article_share", "click_date")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_share")." ADD `click_date` varchar(20) NOT NULL DEFAULT '' COMMENT '执行时间';");
}
if(!pdo_fieldexists("ewei_shop_article_share", "add_credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_share")." ADD `add_credit` int(11) NOT NULL DEFAULT '0' COMMENT '添加的积分';");
}
if(!pdo_fieldexists("ewei_shop_article_share", "add_money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_share")." ADD `add_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '添加的余额';");
}
if(!pdo_fieldexists("ewei_shop_article_share", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_share")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "article_message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `article_message` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "article_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `article_title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "article_image")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `article_image` varchar(300) NOT NULL DEFAULT '' COMMENT '图片';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "article_shownum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `article_shownum` int(11) NOT NULL DEFAULT '0' COMMENT '每页数量';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "article_keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `article_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '关键字';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "article_temp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `article_temp` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "article_source")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `article_source` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_article_sys", "article_close_advanced")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_article_sys")." ADD `article_close_advanced` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "billno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `billno` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `paytype` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "year")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `year` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "month")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `month` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "week")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `week` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "ordercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `ordercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "bonusordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `bonusordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "bonusrate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `bonusrate` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "bonusmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `bonusmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "bonusmoney_send")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `bonusmoney_send` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "bonusmoney_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `bonusmoney_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "partnercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `partnercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `starttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_bill", "confirmtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_bill")." ADD `confirmtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_billo", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billo")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_author_billo", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billo")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_billo", "billid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billo")." ADD `billid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_billo", "authorid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billo")." ADD `authorid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_author_billo", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billo")." ADD `orderid` text;");
}
if(!pdo_fieldexists("ewei_shop_author_billo", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billo")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "billid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `billid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "payno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `payno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `paytype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "bonus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `bonus` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `realmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "paymoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `paymoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "chargemoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `chargemoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `reason` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_author_billp", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_billp")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_level", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_author_level", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_author_level", "levelname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `levelname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_author_level", "bonus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `bonus` decimal(10,4) DEFAULT '0.0000';");
}
if(!pdo_fieldexists("ewei_shop_author_level", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_level", "ordercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `ordercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_level", "commissionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `commissionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_level", "bonusmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `bonusmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_level", "downcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `downcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_level", "bonus_fg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_level")." ADD `bonus_fg` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_author_team", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_author_team", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team", "teamno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `teamno` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_author_team", "year")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `year` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team", "month")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `month` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team", "team_count")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `team_count` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team", "team_ids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `team_ids` longtext;");
}
if(!pdo_fieldexists("ewei_shop_author_team", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team_pay", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team_pay")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_author_team_pay", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team_pay")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team_pay", "teamid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team_pay")." ADD `teamid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team_pay", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team_pay")." ADD `mid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_author_team_pay", "payno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team_pay")." ADD `payno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_author_team_pay", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team_pay")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_team_pay", "paymoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team_pay")." ADD `paymoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_author_team_pay", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_author_team_pay")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_badv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_badv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_badv", "badvname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `badvname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_badv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_badv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_badv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_badv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_badv", "shopid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `shopid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_badv", "iswxapp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_badv")." ADD `iswxapp` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_banner", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_banner", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_banner", "bannername")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `bannername` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_banner", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_banner", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_banner", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_banner", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_banner", "shopid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `shopid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_banner", "iswxapp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_banner")." ADD `iswxapp` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "mall_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `mall_name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "banner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `banner` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "mall_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `mall_title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "mall_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `mall_content` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "mall_logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `mall_logo` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `message` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "partin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `partin` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "rule")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `rule` text;");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "end_message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `end_message` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "follow_swi")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `follow_swi` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_account", "sharestyle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_account")." ADD `sharestyle` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "goods_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `goods_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "now_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `now_price` decimal(9,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "created_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `created_time` datetime NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "update_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `update_time` datetime NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "bargain_times")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `bargain_times` int(10) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `openid` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `nickname` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "head_image")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `head_image` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "bargain_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `bargain_price` decimal(9,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `status` tinyint(2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "account_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `account_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "initiate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `initiate` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_actor", "order")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_actor")." ADD `order` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "account_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `account_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "goods_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `goods_id` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "end_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `end_price` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "start_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `start_time` datetime NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "end_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `end_time` datetime NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `status` tinyint(2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `type` tinyint(2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "user_set")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `user_set` text;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "rule")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `rule` text;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "act_times")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `act_times` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "mode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `mode` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "total_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `total_time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "each_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `each_time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "time_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `time_limit` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "probability")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `probability` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "custom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `custom` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "maximum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `maximum` int(11);");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "initiate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `initiate` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_goods", "myself")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_goods")." ADD `myself` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_bargain_record", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_record")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_bargain_record", "actor_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_record")." ADD `actor_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_record", "bargain_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_record")." ADD `bargain_price` decimal(9,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_record", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_record")." ADD `openid` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_bargain_record", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_record")." ADD `nickname` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_record", "head_image")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_record")." ADD `head_image` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_bargain_record", "bargain_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_bargain_record")." ADD `bargain_time` datetime NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_carrier", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_carrier")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_carrier", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_carrier")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_carrier", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_carrier")." ADD `realname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_carrier", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_carrier")." ADD `mobile` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_carrier", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_carrier")." ADD `address` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_carrier", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_carrier")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_carrier", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_carrier")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_carrier", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_carrier")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_category", "catename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_category")." ADD `catename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_category", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_category")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_category", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_category")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_category")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "cashierid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `cashierid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "clearno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `clearno` varchar(64) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `realmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `remark` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "orderids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `orderids` text;");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `paytype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "payinfo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `payinfo` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_clearing", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_clearing")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "cashierid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `cashierid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `createtime` int(10) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "image")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `image` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "categoryid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `categoryid` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `total` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods")." ADD `goodssn` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods_category", "cashierid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods_category")." ADD `cashierid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods_category", "catename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods_category")." ADD `catename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods_category", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods_category")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods_category", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods_category")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_goods_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_goods_category")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "cashierid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `cashierid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "manageopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `manageopenid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `username` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "password")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `password` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "salt")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `salt` varchar(8) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "perm")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `perm` text;");
}
if(!pdo_fieldexists("ewei_shop_cashier_operator", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_operator")." ADD `createtime` int(10) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "ordersn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `ordersn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "payopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `payopenid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `createtime` int(10) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `status` tinyint(4) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_order", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_order")." ADD `paytime` int(10) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "cashierid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `cashierid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "operatorid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `operatorid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `paytype` tinyint(3);");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "logno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `logno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `status` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "is_applypay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `is_applypay` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "randommoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `randommoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "enough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `enough` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `mobile` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "deduction")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `deduction` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "discountmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `discountmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `discount` decimal(5,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "isgoods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `isgoods` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "orderprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `orderprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "goodsprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `goodsprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "couponpay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `couponpay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "payopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `payopenid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "nosalemoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `nosalemoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "coupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `coupon` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "usecoupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `usecoupon` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "usecouponprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `usecouponprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "present_credit1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `present_credit1` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "refundsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `refundsn` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "refunduser")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `refunduser` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log", "client_ip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log")." ADD `client_ip` varchar(16) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log_goods", "cashierid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log_goods")." ADD `cashierid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log_goods", "logid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log_goods")." ADD `logid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log_goods", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log_goods")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log_goods", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log_goods")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_pay_log_goods", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_pay_log_goods")." ADD `total` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_qrcode", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_qrcode")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_qrcode", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_qrcode")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_qrcode", "cashierid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_qrcode")." ADD `cashierid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_qrcode", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_qrcode")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_qrcode", "goodstitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_qrcode")." ADD `goodstitle` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_qrcode", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_qrcode")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_qrcode", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_qrcode")." ADD `createtime` int(10) unsigned;");
}
if(!pdo_fieldexists("ewei_shop_cashier_randommoney_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_randommoney_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_randommoney_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_randommoney_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_randommoney_log", "cashierid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_randommoney_log")." ADD `cashierid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_randommoney_log", "clientip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_randommoney_log")." ADD `clientip` int(11) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_randommoney_log", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_randommoney_log")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_randommoney_log", "randommoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_randommoney_log")." ADD `randommoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_randommoney_log", "expires_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_randommoney_log")." ADD `expires_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `storeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "setmeal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `setmeal` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `logo` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "manageopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `manageopenid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "isopen_commission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `isopen_commission` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `name` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `mobile` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "categoryid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `categoryid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "wechat_status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `wechat_status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "wechatpay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `wechatpay` text;");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "alipay_status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `alipay_status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "alipay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `alipay` text;");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "withdraw")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `withdraw` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `username` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "password")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `password` varchar(32) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "salt")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `salt` char(8) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "lifetimestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `lifetimestart` int(10) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "lifetimeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `lifetimeend` int(10) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "set")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `set` longtext;");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "can_withdraw")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `can_withdraw` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "show_paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `show_paytype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `couponid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "management")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `management` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_cashier_user", "notice_openids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cashier_user")." ADD `notice_openids` varchar(500);");
}
if(!pdo_fieldexists("ewei_shop_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `uniacid` int(11) DEFAULT '0' COMMENT '所属帐号';");
}
if(!pdo_fieldexists("ewei_shop_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `name` varchar(50) COMMENT '分类名称';");
}
if(!pdo_fieldexists("ewei_shop_category", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `thumb` varchar(255) COMMENT '分类图片';");
}
if(!pdo_fieldexists("ewei_shop_category", "parentid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `parentid` int(11) DEFAULT '0' COMMENT '上级分类ID,0为第一级';");
}
if(!pdo_fieldexists("ewei_shop_category", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `isrecommand` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_category", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `description` varchar(500) COMMENT '分类介绍';");
}
if(!pdo_fieldexists("ewei_shop_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `displayorder` tinyint(3) unsigned DEFAULT '0' COMMENT '排序';");
}
if(!pdo_fieldexists("ewei_shop_category", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `enabled` tinyint(1) DEFAULT '1' COMMENT '是否开启';");
}
if(!pdo_fieldexists("ewei_shop_category", "ishome")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `ishome` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_category", "advimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `advimg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_category", "advurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `advurl` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_category", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_category")." ADD `level` tinyint(3);");
}
if(!pdo_fieldexists("ewei_shop_city_express", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_city_express", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "start_fee")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `start_fee` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "start_km")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `start_km` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "pre_km")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `pre_km` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "pre_km_fee")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `pre_km_fee` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "fixed_km")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `fixed_km` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "fixed_fee")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `fixed_fee` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "receive_goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `receive_goods` int(11);");
}
if(!pdo_fieldexists("ewei_shop_city_express", "lng")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `lng` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "lat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `lat` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "range")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `range` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "zoom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `zoom` int(11) NOT NULL DEFAULT '13';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "express_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `express_type` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "config")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `config` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "tel1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `tel1` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "tel2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `tel2` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "is_sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `is_sum` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "is_dispatch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `is_dispatch` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `enabled` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_city_express", "geo_key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_city_express")." ADD `geo_key` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "applyno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `applyno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `mid` int(11) DEFAULT '0' COMMENT '会员ID';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `type` tinyint(3) DEFAULT '0' COMMENT '0 余额 1 微信';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "orderids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `orderids` longtext;");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "commission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `commission` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "commission_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `commission_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `status` tinyint(3) DEFAULT '0' COMMENT '-1 无效 0 未知 1 正在申请 2 审核通过 3 已经打款';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "applytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `applytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "checktime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `checktime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "invalidtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `invalidtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "refusetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `refusetime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `realmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "deductionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `deductionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "beginmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `beginmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "endmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `endmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "alipay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `alipay` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "bankname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `bankname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "bankcard")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `bankcard` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `realname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "alipay1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `alipay1` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "bankname1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `bankname1` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "bankcard1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `bankcard1` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "repurchase")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `repurchase` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "sendmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `sendmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "senddata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `senddata` text;");
}
if(!pdo_fieldexists("ewei_shop_commission_apply", "bankopen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_apply")." ADD `bankopen` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_bank", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_bank")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_commission_bank", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_bank")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_bank", "bankname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_bank")." ADD `bankname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_bank", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_bank")." ADD `content` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_bank", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_bank")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_bank", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_bank")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_clickcount", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_clickcount")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_commission_clickcount", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_clickcount")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_clickcount", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_clickcount")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_clickcount", "from_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_clickcount")." ADD `from_openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_clickcount", "clicktime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_clickcount")." ADD `clicktime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "levelname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `levelname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "commission1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `commission1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "commission2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `commission2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "commission3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `commission3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "commissionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `commissionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "downcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `downcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "ordercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `ordercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "goodsids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `goodsids` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "goodsids_text")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `goodsids_text` varchar(2000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_level", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_level")." ADD `level` int(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "applyid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `applyid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `mid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "commission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `commission` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "commission_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `commission_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `realmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "deductionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `deductionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_log", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_log")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_rank", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_rank")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_commission_rank", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_rank")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_commission_rank", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_rank")." ADD `type` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_rank", "num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_rank")." ADD `num` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_commission_rank", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_rank")." ADD `status` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_rank", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_rank")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_rank", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_rank")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_commission_relation", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_relation")." ADD `id` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_commission_relation", "pid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_relation")." ADD `pid` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_commission_relation", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_relation")." ADD `level` tinyint(1) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_commission_repurchase", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_repurchase")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_commission_repurchase", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_repurchase")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_repurchase", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_repurchase")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_repurchase", "year")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_repurchase")." ADD `year` int(4) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_repurchase", "month")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_repurchase")." ADD `month` tinyint(2) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_repurchase", "repurchase")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_repurchase")." ADD `repurchase` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_commission_repurchase", "applyid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_repurchase")." ADD `applyid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `mid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `logo` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `img` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `desc` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "selectgoods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `selectgoods` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "selectcategory")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `selectcategory` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_commission_shop", "goodsids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_commission_shop")." ADD `goodsids` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "catid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `catid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "couponname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `couponname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "gettype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `gettype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "getmax")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `getmax` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "usetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `usetype` tinyint(3) DEFAULT '0' COMMENT '消费方式 0 付款使用 1 下单使用';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "returntype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `returntype` tinyint(3) DEFAULT '0' COMMENT '退回方式 0 不可退回 1 取消订单(未付款) 2.退款可以退回';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "bgcolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `bgcolor` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "enough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `enough` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "timelimit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `timelimit` tinyint(3) DEFAULT '0' COMMENT '0 领取后几天有效 1 时间范围';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "coupontype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `coupontype` tinyint(3) DEFAULT '0' COMMENT '0 优惠券 1 充值券';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "timedays")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `timedays` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "timestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `timestart` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "timeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `timeend` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `discount` decimal(10,2) DEFAULT '0.00' COMMENT '折扣';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "deduct")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `deduct` decimal(10,2) DEFAULT '0.00' COMMENT '抵扣';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "backtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `backtype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "backmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `backmoney` varchar(50) DEFAULT '' COMMENT '返现';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "backcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `backcredit` varchar(50) DEFAULT '' COMMENT '返积分';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "backredpack")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `backredpack` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "backwhen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `backwhen` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `desc` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `total` int(11) DEFAULT '0' COMMENT '数量 -1 不限制';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `status` tinyint(3) DEFAULT '0' COMMENT '可用';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `money` decimal(10,2) DEFAULT '0.00' COMMENT '购买价格';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "respdesc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `respdesc` text COMMENT '推送描述';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "respthumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `respthumb` varchar(255) DEFAULT '' COMMENT '推送图片';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "resptitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `resptitle` varchar(255) DEFAULT '' COMMENT '推送标题';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "respurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `respurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `credit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "usecredit2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `usecredit2` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `remark` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "descnoset")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `descnoset` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdkey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdkey` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdsuc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdsuc` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdfail")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdfail` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdask")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdask` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdstatus` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdtimes")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdtimes` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdfull")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdfull` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdwords")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdwords` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdopen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdopen` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdown")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdown` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdexit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdexit` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdexitstr")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdexitstr` text;");
}
if(!pdo_fieldexists("ewei_shop_coupon", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "pwdkey2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `pwdkey2` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitgoodtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitgoodtype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitgoodcatetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitgoodcatetype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitgoodcateids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitgoodcateids` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitgoodids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitgoodids` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "islimitlevel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `islimitlevel` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitmemberlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitmemberlevels` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitagentlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitagentlevels` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitpartnerlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitpartnerlevels` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitaagentlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitaagentlevels` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "tagtitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `tagtitle` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "settitlecolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `settitlecolor` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "titlecolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `titlecolor` varchar(10) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "limitdiscounttype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `limitdiscounttype` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "quickget")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `quickget` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `templateid` varchar(60) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "isfriendcoupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `isfriendcoupon` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon", "url_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon")." ADD `url_limit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_category")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_category")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_category", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_category")." ADD `status` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_category", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_category")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "gettype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `gettype` tinyint(3) DEFAULT '0' COMMENT '获取方式 0 发放 1 领取 2 积分商城';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "used")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `used` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "usetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `usetime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "gettime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `gettime` int(11) DEFAULT '0' COMMENT '获取时间';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "senduid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `senduid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "ordersn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `ordersn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "back")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `back` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "backtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `backtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "isnew")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `isnew` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "nocount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `nocount` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "shareident")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `shareident` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "textkey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `textkey` int(11);");
}
if(!pdo_fieldexists("ewei_shop_coupon_data", "friendcouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_data")." ADD `friendcouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `starttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "sendnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `sendnum` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `num` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "sendpoint")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `sendpoint` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_goodsendtask", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_goodsendtask")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_guess", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_guess")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_guess", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_guess")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_guess", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_guess")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_guess", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_guess")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon_guess", "times")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_guess")." ADD `times` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_guess", "pwdkey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_guess")." ADD `pwdkey` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon_guess", "ok")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_guess")." ADD `ok` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_guess", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_guess")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "logno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `logno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `status` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "paystatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `paystatus` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "creditstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `creditstatus` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `paytype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "getfrom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `getfrom` tinyint(3) DEFAULT '0' COMMENT '0 发放 1 中心 2 积分兑换';");
}
if(!pdo_fieldexists("ewei_shop_coupon_log", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_log")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_record", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_record")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_record", "coupon_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_record")." ADD `coupon_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_record", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_record")." ADD `openid` varchar(60) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_record", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_record")." ADD `mid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_record", "record_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_record")." ADD `record_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_record", "add_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_record")." ADD `add_time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendshow", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendshow")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendshow", "showkey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendshow")." ADD `showkey` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendshow", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendshow")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendshow", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendshow")." ADD `openid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendshow", "coupondataid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendshow")." ADD `coupondataid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "enough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `enough` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `starttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "sendnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `sendnum` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `num` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "sendpoint")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `sendpoint` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_sendtasks", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_sendtasks")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `openid` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `taskid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "sendnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `sendnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "tasktype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `tasktype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "parentorderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `parentorderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_taskdata", "sendpoint")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_taskdata")." ADD `sendpoint` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "usecouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `usecouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `starttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "sendnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `sendnum` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `num` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_coupon_usesendtasks", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_coupon_usesendtasks")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_adv", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_adv")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `uniacid` int(11) DEFAULT '0' COMMENT '所属帐号';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `name` varchar(50) COMMENT '分类名称';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `thumb` varchar(255) COMMENT '分类图片';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `displayorder` tinyint(3) unsigned DEFAULT '0' COMMENT '排序';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `enabled` tinyint(1) DEFAULT '1' COMMENT '是否开启';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "advimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `advimg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "advurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `advurl` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_category", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_category")." ADD `isrecommand` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "logid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `logid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "logno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `logno` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `goodsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `openid` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `nickname` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "headimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `headimg` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `level` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `content` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `images` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "reply_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `reply_content` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "reply_images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `reply_images` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "reply_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `reply_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "append_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `append_content` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "append_images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `append_images` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "append_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `append_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "append_reply_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `append_reply_content` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "append_reply_images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `append_reply_images` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "append_reply_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `append_reply_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "istop")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `istop` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "checked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `checked` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "append_checked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `append_checked` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "virtual")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `virtual` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `deleted` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_comment", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_comment")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `credit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `total` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "totalday")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `totalday` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "chance")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `chance` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "chanceday")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `chanceday` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "detail")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `detail` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "rate1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `rate1` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "rate2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `rate2` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "joins")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `joins` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "views")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `views` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "showlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `showlevels` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "buylevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `buylevels` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "showgroups")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `showgroups` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "buygroups")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `buygroups` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "vip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `vip` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "istop")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `istop` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `isrecommand` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "istime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `istime` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "timestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `timestart` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "timeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `timeend` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `share_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `share_icon` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `share_desc` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "followneed")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `followneed` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "followtext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `followtext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "subtitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `subtitle` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "subdetail")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `subdetail` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "noticedetail")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `noticedetail` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "usedetail")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `usedetail` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "goodsdetail")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `goodsdetail` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "isendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `isendtime` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "usecredit2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `usecredit2` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "area")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `area` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "dispatch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `dispatch` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "storeids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `storeids` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "noticeopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `noticeopenid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "noticetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `noticetype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "isverify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `isverify` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "goodstype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `goodstype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "productprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `productprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "mincredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `mincredit` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "minmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `minmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "maxcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `maxcredit` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "maxmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `maxmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "dispatchtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `dispatchtype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "dispatchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `dispatchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "verifytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `verifytype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "verifynum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `verifynum` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "grant1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `grant1` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "grant2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `grant2` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `goodssn` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "productsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `productsn` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "weight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `weight` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "showtotal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `showtotal` tinyint(3) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "totalcnf")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `totalcnf` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "usetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `usetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "hasoption")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `hasoption` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "noticedetailshow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `noticedetailshow` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "detailshow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `detailshow` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "packetmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `packetmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "surplusmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `surplusmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "packetlimit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `packetlimit` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "packettype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `packettype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "minpacketmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `minpacketmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "packettotal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `packettotal` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "packetsurplus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `packetsurplus` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "maxpacketmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `maxpacketmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "ccates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `ccates` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "pcates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `pcates` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_goods", "tcates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_goods")." ADD `tcates` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "logno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `logno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "eno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `eno` varchar(255) DEFAULT '' COMMENT '兑换码';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `status` tinyint(3) DEFAULT '0' COMMENT '0 只生成记录未参加 1 未中奖 2 已中奖 3 已发奖';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "paystatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `paystatus` tinyint(3) DEFAULT '0' COMMENT '支付状态 -1 不需要支付 0 未支付 1 已支付';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `paytype` tinyint(3) DEFAULT '-1' COMMENT '支付类型 -1 不需要支付 0 余额 1 微信';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "dispatchstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `dispatchstatus` tinyint(3) DEFAULT '0' COMMENT '运费状态 -1 不需要运费 0 未支付 1 已支付';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "creditpay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `creditpay` tinyint(3) DEFAULT '0' COMMENT '积分支付 0 未支付 1 已支付';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "addressid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `addressid` int(11) DEFAULT '0' COMMENT '收货地址';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "dispatchno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `dispatchno` varchar(255) DEFAULT '' COMMENT '运费支付单号';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "usetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `usetime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `express` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `expresssn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `expresscom` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "verifyopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `verifyopenid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `storeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `realname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "dupdate1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `dupdate1` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "transid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `transid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "dispatchtransid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `dispatchtransid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `address` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `optionid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "time_send")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `time_send` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "time_finish")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `time_finish` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "iscomment")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `iscomment` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "dispatchtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `dispatchtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "verifynum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `verifynum` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "verifytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `verifytime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "remarksaler")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `remarksaler` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "dispatch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `dispatch` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `credit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "goods_num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `goods_num` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "merchapply")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `merchapply` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_log", "pay_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_log")." ADD `pay_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `goodsid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `title` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `thumb` varchar(60) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `credit` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `total` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "weight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `weight` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "specs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `specs` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "skuId")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `skuId` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `goodssn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "productsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `productsn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "virtual")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `virtual` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_option", "exchange_stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_option")." ADD `exchange_stock` int(11) NOT NULL DEFAULT '-1';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `title` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `description` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "displaytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `displaytype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec", "propId")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec")." ADD `propId` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "specid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `specid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "show")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `show` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "valueId")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `valueId` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_spec_item", "virtual")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_spec_item")." ADD `virtual` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `openid` varchar(45) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "logid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `logid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "verifycode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `verifycode` varchar(45);");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `storeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "verifier")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `verifier` varchar(45) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "isverify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `isverify` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "verifytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `verifytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_creditshop_verify", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_creditshop_verify")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_customer", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer", "kf_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer")." ADD `kf_id` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_customer", "kf_account")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer")." ADD `kf_account` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer", "kf_nick")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer")." ADD `kf_nick` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer", "kf_pwd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer")." ADD `kf_pwd` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer", "kf_headimgurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer")." ADD `kf_headimgurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_customer_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_category")." ADD `name` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `realname` varchar(11) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "weixin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `weixin` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `images` text;");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `remark` text;");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer_guestbook", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_guestbook")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer_robot", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_robot")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_customer_robot", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_robot")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer_robot", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_robot")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_customer_robot", "keywords")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_robot")." ADD `keywords` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer_robot", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_robot")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer_robot", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_robot")." ADD `content` longtext;");
}
if(!pdo_fieldexists("ewei_shop_customer_robot", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_robot")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_customer_robot", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_customer_robot")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `orderid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "cycelsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `cycelsn` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "sendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `sendtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "receipttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `receipttime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `remark` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "addressid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `addressid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "dispatchprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `dispatchprice` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "dispatchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `dispatchid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "dispatchtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `dispatchtype` tinyint(3);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "finishtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `finishtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `expresscom` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `expresssn` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `express` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `address` text;");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "updatelog")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `updatelog` text;");
}
if(!pdo_fieldexists("ewei_shop_cycelbuy_periods", "ispostpone")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_cycelbuy_periods")." ADD `ispostpone` tinyint(4) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_datatransfer", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_datatransfer")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_datatransfer", "fromuniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_datatransfer")." ADD `fromuniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_datatransfer", "touniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_datatransfer")." ADD `touniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_datatransfer", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_datatransfer")." ADD `status` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_designer", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_designer", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `uniacid` int(11) NOT NULL DEFAULT '0' COMMENT '公众号';");
}
if(!pdo_fieldexists("ewei_shop_designer", "pagename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `pagename` varchar(255) NOT NULL DEFAULT '' COMMENT '页面名称';");
}
if(!pdo_fieldexists("ewei_shop_designer", "pagetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `pagetype` tinyint(3) NOT NULL DEFAULT '0' COMMENT '页面类型';");
}
if(!pdo_fieldexists("ewei_shop_designer", "pageinfo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `pageinfo` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_designer", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `createtime` varchar(255) NOT NULL DEFAULT '' COMMENT '页面创建时间';");
}
if(!pdo_fieldexists("ewei_shop_designer", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `keyword` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_designer", "savetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `savetime` varchar(255) NOT NULL DEFAULT '' COMMENT '页面最后保存时间';");
}
if(!pdo_fieldexists("ewei_shop_designer", "setdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `setdefault` tinyint(3) NOT NULL DEFAULT '0' COMMENT '默认页面';");
}
if(!pdo_fieldexists("ewei_shop_designer", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer")." ADD `datas` text NOT NULL COMMENT '数据';");
}
if(!pdo_fieldexists("ewei_shop_designer_menu", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer_menu")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_designer_menu", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer_menu")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_designer_menu", "menuname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer_menu")." ADD `menuname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_designer_menu", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer_menu")." ADD `isdefault` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_designer_menu", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer_menu")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_designer_menu", "menus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer_menu")." ADD `menus` text;");
}
if(!pdo_fieldexists("ewei_shop_designer_menu", "params")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_designer_menu")." ADD `params` text;");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "dispatchname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `dispatchname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "dispatchtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `dispatchtype` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "firstprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `firstprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "secondprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `secondprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "firstweight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `firstweight` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "secondweight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `secondweight` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `express` varchar(250) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "areas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `areas` longtext;");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "carriers")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `carriers` text;");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "calculatetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `calculatetype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "firstnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `firstnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "secondnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `secondnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "firstnumprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `firstnumprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "secondnumprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `secondnumprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `isdefault` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "shopid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `shopid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "nodispatchareas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `nodispatchareas` text;");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "nodispatchareas_code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `nodispatchareas_code` longtext;");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "isdispatcharea")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `isdispatcharea` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dispatch", "freeprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dispatch")." ADD `freeprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "applyno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `applyno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `mid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "orderids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `orderids` longtext;");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "dividend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `dividend` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "dividend_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `dividend_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "applytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `applytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "checktime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `checktime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "invalidtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `invalidtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `realmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "deductionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `deductionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "beginmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `beginmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "endmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `endmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "alipay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `alipay` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "bankname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `bankname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "bankcard")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `bankcard` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "alipay1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `alipay1` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "bankname1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `bankname1` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "bankcard1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `bankcard1` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `realname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "sendmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `sendmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "senddata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `senddata` text;");
}
if(!pdo_fieldexists("ewei_shop_dividend_apply", "bankopen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_apply")." ADD `bankopen` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_bank", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_bank")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_dividend_bank", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_bank")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_bank", "bankname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_bank")." ADD `bankname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_bank", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_bank")." ADD `content` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_dividend_bank", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_bank")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_bank", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_bank")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_init", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_init")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_dividend_init", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_init")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_init", "headsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_init")." ADD `headsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_init", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_init")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "applyid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `applyid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `mid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "dividend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `dividend` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "dividend_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `dividend_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `realmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "deductionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `deductionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_dividend_log", "type1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_dividend_log")." ADD `type1` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diyform_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_category")." ADD `name` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_diyform_data", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_data")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diyform_data", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_data")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_data", "typeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_data")." ADD `typeid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_data", "cid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_data")." ADD `cid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_data", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_data")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_diyform_data", "fields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_data")." ADD `fields` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_diyform_data", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_data")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diyform_data", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_data")." ADD `type` tinyint(2) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "typeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `typeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "cid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `cid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "fields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `fields` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `type` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "diyformid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `diyformid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "carrier_realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `carrier_realname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diyform_temp", "carrier_mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_temp")." ADD `carrier_mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "fields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `fields` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "usedata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `usedata` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "alldata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `alldata` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `status` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_diyform_type", "savedata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diyform_type")." ADD `savedata` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diypage", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `data` longtext NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_diypage", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "lastedittime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `lastedittime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `keyword` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "diymenu")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `diymenu` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "merch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `merch` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage", "diyadv")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage")." ADD `diyadv` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_menu", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_menu")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diypage_menu", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_menu")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_menu", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_menu")." ADD `name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diypage_menu", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_menu")." ADD `data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_diypage_menu", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_menu")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_menu", "lastedittime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_menu")." ADD `lastedittime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_menu", "merch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_menu")." ADD `merch` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `type` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "lastedittime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `lastedittime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_plu", "merch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_plu")." ADD `merch` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `data` longtext NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "preview")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `preview` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "tplid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `tplid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template", "merch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template")." ADD `merch` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_diypage_template_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template_category")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template_category")." ADD `name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_diypage_template_category", "merch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_diypage_template_category")." ADD `merch` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_domain_bindings", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_domain_bindings")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_domain_bindings", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_domain_bindings")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_domain_bindings", "domain")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_domain_bindings")." ADD `domain` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_domain_bindings", "plugin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_domain_bindings")." ADD `plugin` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_domain_bindings", "mobile_domain")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_domain_bindings")." ADD `mobile_domain` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `openid` varchar(100);");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `goodsid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `total` int(10) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `marketprice` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `optionid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "selected")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `selected` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "groupid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `groupid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_exchange_cart", "serial")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_cart")." ADD `serial` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "groupid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `groupid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `endtime` datetime NOT NULL DEFAULT '2016-10-01 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `status` int(2) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "count")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `count` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `key` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `type` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "scene")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `scene` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "qrcode_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `qrcode_url` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "serial")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `serial` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "balancestatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `balancestatus` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "redstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `redstatus` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "scorestatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `scorestatus` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "couponstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `couponstatus` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "goodsstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `goodsstatus` int(11);");
}
if(!pdo_fieldexists("ewei_shop_exchange_code", "repeatcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_code")." ADD `repeatcount` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `type` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `endtime` datetime NOT NULL DEFAULT '2016-10-01 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "mode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `mode` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `status` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "max")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `max` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "value")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `value` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `starttime` datetime NOT NULL DEFAULT '2016-10-01 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `goods` text;");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "score")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `score` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "coupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `coupon` text;");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "use")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `use` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `total` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "red")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `red` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "balance")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `balance` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "balance_left")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `balance_left` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "balance_right")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `balance_right` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "red_left")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `red_left` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "red_right")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `red_right` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "score_left")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `score_left` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "score_right")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `score_right` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "balance_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `balance_type` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "red_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `red_type` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "score_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `score_type` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "title_reply")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `title_reply` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `img` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `content` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "rule")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `rule` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "coupon_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `coupon_type` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "basic_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `basic_content` varchar(500) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "reply_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `reply_type` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "code_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `code_type` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "binding")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `binding` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "showcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `showcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "postage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `postage` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "postage_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `postage_type` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "banner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `banner` varchar(800) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "keyword_reply")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `keyword_reply` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "reply_status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `reply_status` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "reply_keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `reply_keyword` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "input_banner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `input_banner` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "diypage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `diypage` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "sendname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `sendname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "wishing")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `wishing` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "actname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `actname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `remark` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "repeat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `repeat` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "koulingstart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `koulingstart` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "koulingend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `koulingend` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "kouling")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `kouling` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "chufa")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `chufa` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "chufaend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `chufaend` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_group", "goods_native")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_group")." ADD `goods_native` text;");
}
if(!pdo_fieldexists("ewei_shop_exchange_query", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_query")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exchange_query", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_query")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_query", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_query")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_query", "querykey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_query")." ADD `querykey` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_query", "querytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_query")." ADD `querytime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_query", "unfreeze")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_query")." ADD `unfreeze` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_query", "errorcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_query")." ADD `errorcount` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `key` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `goods` text;");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `orderid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "mode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `mode` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "balance")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `balance` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "red")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `red` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "coupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `coupon` text;");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "score")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `score` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `nickname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "groupid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `groupid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "serial")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `serial` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "ordersn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `ordersn` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exchange_record", "goods_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_record")." ADD `goods_title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "freeze")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `freeze` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "mistake")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `mistake` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "grouplimit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `grouplimit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "alllimit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `alllimit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "no_qrimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `no_qrimg` tinyint(3) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "rule")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `rule` text;");
}
if(!pdo_fieldexists("ewei_shop_exchange_setting", "coupon_templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exchange_setting")." ADD `coupon_templateid` varchar(60) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet")." ADD `name` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet")." ADD `express` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet", "code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet")." ADD `code` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet")." ADD `datas` text;");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "esheetid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `esheetid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "esheetname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `esheetname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "customername")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `customername` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "customerpwd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `customerpwd` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "monthcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `monthcode` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "sendsite")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `sendsite` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `paytype` tinyint(3) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "templatesize")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `templatesize` varchar(10) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "isnotice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `isnotice` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "issend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `issend` tinyint(3) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_esheet_temp", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_esheet_temp")." ADD `isdefault` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `type` int(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "expressname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `expressname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `expresscom` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `express` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "width")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `width` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `datas` text;");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "height")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `height` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "bg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `bg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `isdefault` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_express", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_express")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "sendername")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `sendername` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "sendertel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `sendertel` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "sendersign")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `sendersign` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "sendercode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `sendercode` int(11);");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "senderaddress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `senderaddress` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "sendercity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `sendercity` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `isdefault` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "province")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `province` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "city")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `city` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_senduser", "area")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_senduser")." ADD `area` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "ip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `ip` varchar(20) NOT NULL DEFAULT 'localhost';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "ip_cloud")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `ip_cloud` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "port")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `port` int(11) NOT NULL DEFAULT '8000';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "port_cloud")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `port_cloud` int(11) NOT NULL DEFAULT '8000';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "is_cloud")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `is_cloud` int(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "ebusiness")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `ebusiness` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_exhelper_sys", "apikey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_exhelper_sys")." ADD `apikey` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_express", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_express", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express")." ADD `name` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_express", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express")." ADD `express` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_express", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express")." ADD `status` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_express", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express")." ADD `displayorder` tinyint(3) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_express", "code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express")." ADD `code` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_express", "coding")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express")." ADD `coding` varchar(10) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_express_cache", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express_cache")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_express_cache", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express_cache")." ADD `expresssn` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_express_cache", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express_cache")." ADD `express` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_express_cache", "lasttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express_cache")." ADD `lasttime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_express_cache", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_express_cache")." ADD `datas` text;");
}
if(!pdo_fieldexists("ewei_shop_feedback", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_feedback", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `openid` varchar(50) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `type` tinyint(1) DEFAULT '1' COMMENT '1为维权2为投诉';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `status` tinyint(1) DEFAULT '0' COMMENT '状态 0 未解决1用户同意2用户拒绝';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "feedbackid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `feedbackid` varchar(100) DEFAULT '' COMMENT '投诉单号';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "transid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `transid` varchar(100) DEFAULT '' COMMENT '订单号';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `reason` varchar(1000) DEFAULT '' COMMENT '理由';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "solution")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `solution` varchar(1000) DEFAULT '' COMMENT '期待解决方案';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `remark` varchar(1000) DEFAULT '' COMMENT '备注';");
}
if(!pdo_fieldexists("ewei_shop_feedback", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_feedback")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_form", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_form", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_form", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_form", "isrequire")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `isrequire` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_form", "key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `key` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_form", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_form", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `type` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_form", "values")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `values` text;");
}
if(!pdo_fieldexists("ewei_shop_form", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_form_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_form_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_form_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_form_category")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "people_count")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `people_count` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "coupon_money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `coupon_money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "use_condition")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `use_condition` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "duration")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `duration` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "allocate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `allocate` tinyint(2) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "upper_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `upper_limit` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "launches_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `launches_limit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "launches_count")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `launches_count` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "activity_start_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `activity_start_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "activity_end_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `activity_end_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `desc` text;");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "use_time_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `use_time_limit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "use_start_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `use_start_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "use_end_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `use_end_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "limitdiscounttype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `limitdiscounttype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "limitgoodcatetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `limitgoodcatetype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "limitgoodcateids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `limitgoodcateids` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "limitgoodtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `limitgoodtype` tinyint(1) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "limitgoodids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `limitgoodids` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "use_valid_days")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `use_valid_days` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `status` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `deleted` tinyint(1) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "stop_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `stop_time` int(11) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon")." ADD `create_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "headerid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `headerid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "activity_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `activity_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "enough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `enough` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "deduct")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `deduct` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "timestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `timestart` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "timeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `timeend` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "avatar")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `avatar` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `nickname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "receive_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `receive_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "deadline")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `deadline` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "is_send")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `is_send` tinyint(1) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "send_failed_message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `send_failed_message` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_friendcoupon_data", "form_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_friendcoupon_data")." ADD `form_id` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `goodsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "titles")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `titles` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `marketprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "minallfullbackallprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `minallfullbackallprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "maxallfullbackallprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `maxallfullbackallprice` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "minallfullbackallratio")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `minallfullbackallratio` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "maxallfullbackallratio")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `maxallfullbackallratio` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "day")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `day` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "fullbackprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `fullbackprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "fullbackratio")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `fullbackratio` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "hasoption")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `hasoption` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `optionid` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "startday")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `startday` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_goods", "refund")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_goods")." ADD `refund` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `openid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `orderid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `price` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "priceevery")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `priceevery` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "day")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `day` int(10) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "fullbackday")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `fullbackday` int(10) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `createtime` int(10) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "fullbacktime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `fullbacktime` int(10) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "isfullback")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `isfullback` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `goodsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log")." ADD `optionid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log_map", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log_map")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_fullback_log_map", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log_map")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log_map", "fullback_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log_map")." ADD `fullback_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log_map", "logid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log_map")." ADD `logid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log_map", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log_map")." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log_map", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log_map")." ADD `goodsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log_map", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log_map")." ADD `optionid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_fullback_log_map", "day")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_fullback_log_map")." ADD `day` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_funbar", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_funbar")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_funbar", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_funbar")." ADD `uid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_funbar", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_funbar")." ADD `datas` text;");
}
if(!pdo_fieldexists("ewei_shop_funbar", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_funbar")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_gift", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_gift", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_gift", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_gift", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_gift", "activity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `activity` tinyint(3) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_gift", "orderprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `orderprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_gift", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `goodsid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_gift", "giftgoodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `giftgoodsid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_gift", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `starttime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_gift", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `endtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_gift", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_gift", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_gift", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `share_title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_gift", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `share_icon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_gift", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_gift")." ADD `share_desc` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "billno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `billno` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `paytype` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "year")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `year` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "month")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `month` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "week")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `week` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "ordercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `ordercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "bonusmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `bonusmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "bonusmoney_send")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `bonusmoney_send` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "bonusmoney_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `bonusmoney_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "partnercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `partnercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `starttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "confirmtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `confirmtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "bonusordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `bonusordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_bill", "bonusrate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_bill")." ADD `bonusrate` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billo", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billo")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_globonus_billo", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billo")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billo", "billid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billo")." ADD `billid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billo", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billo")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billo", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billo")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "billid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `billid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "payno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `payno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `paytype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "bonus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `bonus` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `realmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "paymoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `paymoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "chargemoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `chargemoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `reason` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_globonus_billp", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_billp")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "levelname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `levelname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "bonus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `bonus` decimal(10,4) DEFAULT '0.0000';");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "ordercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `ordercount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "commissionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `commissionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "bonusmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `bonusmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_globonus_level", "downcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_globonus_level")." ADD `downcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "pcate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `pcate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "ccate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `ccate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `type` tinyint(1) DEFAULT '1' COMMENT '1为实体2为虚拟';");
}
if(!pdo_fieldexists("ewei_shop_goods", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `status` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_goods", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `title` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "unit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `unit` varchar(5) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `description` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `content` longtext;");
}
if(!pdo_fieldexists("ewei_shop_goods", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `goodssn` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "productsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `productsn` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "productprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `productprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `marketprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "costprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `costprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "originalprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `originalprice` decimal(10,2) DEFAULT '0.00' COMMENT '原价';");
}
if(!pdo_fieldexists("ewei_shop_goods", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `total` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "totalcnf")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `totalcnf` int(11) DEFAULT '0' COMMENT '0 拍下减库存 1 付款减库存 2 永久不减';");
}
if(!pdo_fieldexists("ewei_shop_goods", "sales")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `sales` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "salesreal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `salesreal` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "spec")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `spec` varchar(5000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "weight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `weight` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `credit` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods", "maxbuy")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `maxbuy` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "usermaxbuy")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `usermaxbuy` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "hasoption")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `hasoption` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "dispatch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `dispatch` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "thumb_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `thumb_url` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "isnew")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isnew` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "ishot")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `ishot` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isdiscount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isdiscount` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isrecommand` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "issendfree")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `issendfree` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "istime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `istime` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "iscomment")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `iscomment` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "timestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `timestart` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "timeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `timeend` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "viewcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `viewcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "hascommission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `hascommission` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "commission1_rate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `commission1_rate` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "commission1_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `commission1_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "commission2_rate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `commission2_rate` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "commission2_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `commission2_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "commission3_rate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `commission3_rate` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "commission3_pay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `commission3_pay` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "score")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `score` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "taobaoid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `taobaoid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "taotaoid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `taotaoid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "taobaourl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `taobaourl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "updatetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `updatetime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `share_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `share_icon` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "cash")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `cash` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "commission_thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `commission_thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isnodiscount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isnodiscount` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "showlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `showlevels` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "buylevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buylevels` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "showgroups")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `showgroups` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "buygroups")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buygroups` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "isverify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isverify` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "storeids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `storeids` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "noticeopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `noticeopenid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "tcate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `tcate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "noticetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `noticetype` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "needfollow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `needfollow` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "followtip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `followtip` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "followurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `followurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "deduct")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `deduct` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "virtual")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `virtual` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "ccates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `ccates` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "discounts")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `discounts` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "nocommission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `nocommission` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "hidecommission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `hidecommission` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "pcates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `pcates` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "tcates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `tcates` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "artid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `artid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "detail_logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `detail_logo` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "detail_shopname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `detail_shopname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "detail_btntext1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `detail_btntext1` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "detail_btnurl1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `detail_btnurl1` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "detail_btntext2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `detail_btntext2` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "detail_btnurl2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `detail_btnurl2` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "detail_totaltitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `detail_totaltitle` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "deduct2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `deduct2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "ednum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `ednum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "edmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `edmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "edareas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `edareas` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "cates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `cates` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "isdiscount_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isdiscount_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isdiscount_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isdiscount_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isdiscount_discounts")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isdiscount_discounts` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "commission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `commission` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "shorttitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `shorttitle` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "diyformtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `diyformtype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "diyformid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `diyformid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "diymode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `diymode` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "dispatchtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `dispatchtype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "dispatchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `dispatchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "dispatchprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `dispatchprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "manydeduct")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `manydeduct` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "saleupdate37975")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `saleupdate37975` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "shopid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `shopid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "allcates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `allcates` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "minbuy")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `minbuy` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "invoice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `invoice` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "repair")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `repair` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "seven")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `seven` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `money` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "minprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `minprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "maxprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `maxprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "province")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `province` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "city")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `city` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "buyshow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buyshow` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "buycontent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buycontent` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "saleupdate51117")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `saleupdate51117` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "virtualsend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `virtualsend` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "virtualsendcontent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `virtualsendcontent` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "verifytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `verifytype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "diyfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `diyfields` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "diysaveid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `diysaveid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "diysave")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `diysave` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "quality")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `quality` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "groupstype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `groupstype` tinyint(1) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "showtotal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `showtotal` tinyint(1) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "subtitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `subtitle` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "sharebtn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `sharebtn` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "checked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `checked` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "thumb_first")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `thumb_first` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "merchsale")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `merchsale` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "catesinit3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `catesinit3` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "showtotaladd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `showtotaladd` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "keywords")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `keywords` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "catch_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `catch_id` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "catch_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `catch_url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "catch_source")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `catch_source` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "labelname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `labelname` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "autoreceive")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `autoreceive` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "cannotrefund")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `cannotrefund` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "bargain")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `bargain` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "buyagain")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buyagain` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "buyagain_islong")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buyagain_islong` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "buyagain_condition")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buyagain_condition` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "buyagain_sale")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buyagain_sale` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "buyagain_commission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buyagain_commission` text;");
}
if(!pdo_fieldexists("ewei_shop_goods", "diypage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `diypage` int(11);");
}
if(!pdo_fieldexists("ewei_shop_goods", "cashier")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `cashier` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isendtime` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "usetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `usetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `endtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "merchdisplayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `merchdisplayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "exchange_stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `exchange_stock` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "exchange_postage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `exchange_postage` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "ispresell")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `ispresell` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "presellprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `presellprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "presellover")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `presellover` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "presellovertime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `presellovertime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods", "presellstart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `presellstart` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "preselltimestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `preselltimestart` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "presellend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `presellend` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "preselltimeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `preselltimeend` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "presellsendtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `presellsendtype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "presellsendstatrttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `presellsendstatrttime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "presellsendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `presellsendtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "edareas_code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `edareas_code` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods", "unite_total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `unite_total` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "threen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `threen` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "buyagain_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `buyagain_price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "intervalfloor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `intervalfloor` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "intervalprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `intervalprice` varchar(512) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isfullback")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isfullback` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isstatustime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isstatustime` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "statustimestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `statustimestart` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "statustimeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `statustimeend` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "nosearch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `nosearch` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "showsales")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `showsales` tinyint(3) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_goods", "islive")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `islive` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "liveprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `liveprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "opencard")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `opencard` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "cardid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `cardid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "verifygoodsnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `verifygoodsnum` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_goods", "verifygoodsdays")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `verifygoodsdays` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_goods", "verifygoodslimittype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `verifygoodslimittype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "verifygoodslimitdate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `verifygoodslimitdate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "minliveprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `minliveprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "maxliveprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `maxliveprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "dowpayment")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `dowpayment` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods", "tempid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `tempid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isstoreprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isstoreprice` tinyint(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "beforehours")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `beforehours` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "newgoods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `newgoods` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "video")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `video` varchar(512) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "officthumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `officthumb` varchar(512) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "verifygoodstype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `verifygoodstype` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isforceverifystore")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isforceverifystore` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "manydeduct2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `manydeduct2` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "membercardpoint")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `membercardpoint` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "refund")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `refund` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "returngoods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `returngoods` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "exchange")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `exchange` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isdiscount_time_start")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isdiscount_time_start` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods", "import_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `import_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "isshowfreight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `isshowfreight` int(2) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_goods", "video_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `video_type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods", "video_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `video_url` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods", "end_video_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `end_video_url` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods", "video_cut")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods")." ADD `video_cut` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_id` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_brand_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_brand_name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_totalquantity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_totalquantity` int(11);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_quantity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_quantity` int(11);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_logoimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_logoimg` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_logowxurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_logowxurl` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_backgroundtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_backgroundtype` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "color")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `color` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_backgroundimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_backgroundimg` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_backgroundwxurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_backgroundwxurl` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "prerogative")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `prerogative` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "card_description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `card_description` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "freewifi")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `freewifi` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "withpet")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `withpet` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "freepark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `freepark` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "deliver")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `deliver` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "custom_cell1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `custom_cell1` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "custom_cell1_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `custom_cell1_name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "custom_cell1_tips")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `custom_cell1_tips` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "custom_cell1_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `custom_cell1_url` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_goods_cards", "color2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_cards")." ADD `color2` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_comment", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_comment")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_comment", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_comment")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_comment", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_comment")." ADD `goodsid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_comment", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_comment")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_comment", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_comment")." ADD `nickname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_comment", "headimgurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_comment")." ADD `headimgurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_comment", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_comment")." ADD `content` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_comment", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_comment")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_group", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_group")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_group", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_group")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_group", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_group")." ADD `name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_group", "goodsids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_group")." ADD `goodsids` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_group", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_group")." ADD `enabled` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_group", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_group")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_label", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_label")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_label", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_label")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_label", "label")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_label")." ADD `label` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_label", "labelname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_label")." ADD `labelname` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_label", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_label")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_label", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_label")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_labelstyle", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_labelstyle")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_labelstyle", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_labelstyle")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_labelstyle", "style")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_labelstyle")." ADD `style` int(3) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `goodsid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `title` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "productprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `productprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `marketprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "costprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `costprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `stock` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "weight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `weight` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "specs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `specs` text;");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "skuId")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `skuId` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `goodssn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "productsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `productsn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "virtual")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `virtual` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "exchange_stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `exchange_stock` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "exchange_postage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `exchange_postage` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "presellprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `presellprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "day")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `day` int(3) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "allfullbackprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `allfullbackprice` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "fullbackprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `fullbackprice` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "allfullbackratio")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `allfullbackratio` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "fullbackratio")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `fullbackratio` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "isfullback")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `isfullback` tinyint(3) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "islive")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `islive` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "liveprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `liveprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_goods_option", "cycelbuy_periodic")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_option")." ADD `cycelbuy_periodic` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_param", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_param")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_param", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_param")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_param", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_param")." ADD `goodsid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_param", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_param")." ADD `title` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_param", "value")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_param")." ADD `value` text;");
}
if(!pdo_fieldexists("ewei_shop_goods_param", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_param")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `title` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `description` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "displaytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `displaytype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "propId")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `propId` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec", "iscycelbuy")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec")." ADD `iscycelbuy` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "specid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `specid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "show")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `show` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "valueId")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `valueId` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "virtual")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `virtual` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goods_spec_item", "cycelbuy_periodic")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goods_spec_item")." ADD `cycelbuy_periodic` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goodscircle_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscircle_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goodscircle_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscircle_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goodscircle_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscircle_log")." ADD `openid` varchar(65) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goodscircle_log", "op_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscircle_log")." ADD `op_type` varchar(16) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goodscircle_log", "op_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscircle_log")." ADD `op_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goodscircle_log", "is_success")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscircle_log")." ADD `is_success` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_goodscircle_log", "response_msg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscircle_log")." ADD `response_msg` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_goodscircle_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscircle_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_goodscode_good", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscode_good")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_goodscode_good", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscode_good")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goodscode_good", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscode_good")." ADD `goodsid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goodscode_good", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscode_good")." ADD `title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goodscode_good", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscode_good")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goodscode_good", "qrcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscode_good")." ADD `qrcode` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goodscode_good", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscode_good")." ADD `status` tinyint(3) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_goodscode_good", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_goodscode_good")." ADD `displayorder` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `name` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `thumb` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `displayorder` tinyint(3) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `enabled` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "advimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `advimg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "advurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `advurl` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_category", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_category")." ADD `isrecommand` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `displayorder` int(11) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `goodssn` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "productsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `productsn` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "category")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `category` int(11);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "showstock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `showstock` tinyint(2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `stock` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "groupsprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `groupsprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "goodsnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `goodsnum` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "purchaselimit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `purchaselimit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "single")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `single` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "singleprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `singleprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "units")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `units` varchar(255) NOT NULL DEFAULT '件';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "dispatchtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `dispatchtype` tinyint(2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "dispatchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `dispatchid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "freight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `freight` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `endtime` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "groupnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `groupnum` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "sales")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `sales` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `description` varchar(1000);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `createtime` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "isindex")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `isindex` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `deleted` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `goodsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "followneed")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `followneed` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "followtext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `followtext` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "followurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `followurl` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `share_title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `share_icon` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `share_desc` varchar(500);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "deduct")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `deduct` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "thumb_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `thumb_url` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "rights")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `rights` tinyint(2) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "gid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `gid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `discount` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "headstype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `headstype` tinyint(3);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "headsmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `headsmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "headsdiscount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `headsdiscount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "isdiscount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `isdiscount` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "isverify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `isverify` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "verifytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `verifytype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "verifynum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `verifynum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "storeids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `storeids` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "shorttitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `shorttitle` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "teamnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `teamnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "more_spec")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `more_spec` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods", "is_ladder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods")." ADD `is_ladder` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_atlas", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_atlas")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_atlas", "g_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_atlas")." ADD `g_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_atlas", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_atlas")." ADD `thumb` varchar(145) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "groups_goods_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `groups_goods_id` int(255) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "goods_option_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `goods_option_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `marketprice` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `price` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "single_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `single_price` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "specs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `specs` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_goods_option", "stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_goods_option")." ADD `stock` int(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_ladder", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_ladder")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_ladder", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_ladder")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_groups_ladder", "goods_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_ladder")." ADD `goods_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_ladder", "ladder_num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_ladder")." ADD `ladder_num` int(11);");
}
if(!pdo_fieldexists("ewei_shop_groups_ladder", "ladder_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_ladder")." ADD `ladder_price` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `openid` varchar(45) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "orderno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `orderno` varchar(45) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "groupnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `groupnum` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `paytime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `credit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "creditmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `creditmoney` decimal(11,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `price` decimal(11,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "freight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `freight` decimal(11,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `status` int(9) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "pay_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `pay_type` varchar(45);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "dispatchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `dispatchid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "addressid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `addressid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `address` varchar(1000);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "goodid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `goodid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "teamid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `teamid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "is_team")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `is_team` int(2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "heads")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `heads` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `discount` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `starttime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "canceltime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `canceltime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `endtime` int(45) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `createtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "finishtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `finishtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "refundid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `refundid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "refundstate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `refundstate` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "refundtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `refundtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `express` varchar(45);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `expresscom` varchar(100);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `expresssn` varchar(45);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "sendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `sendtime` int(45) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `remark` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "remarkclose")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `remarkclose` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "remarksend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `remarksend` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `message` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "success")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `success` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `deleted` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `realname` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `mobile` varchar(11);");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "isverify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `isverify` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "verifytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `verifytype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "verifycode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `verifycode` varchar(45) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "verifynum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `verifynum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "printstate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `printstate` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "printstate2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `printstate2` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "apppay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `apppay` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "isborrow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `isborrow` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "borrowopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `borrowopenid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "source")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `source` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "ladder_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `ladder_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "is_ladder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `is_ladder` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "more_spec")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `more_spec` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "wxapp_prepay_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `wxapp_prepay_id` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "cancel_reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `cancel_reason` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "goods_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `goods_price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "goods_option_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `goods_option_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "specs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `specs` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "diyformid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `diyformid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_order", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "goods_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `goods_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "groups_goods_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `groups_goods_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "groups_goods_option_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `groups_goods_option_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "groups_order_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `groups_order_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `price` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "option_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `option_name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_order_goods", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_goods")." ADD `create_time` int(11);");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `openid` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `orderid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "refundno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `refundno` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "refundstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `refundstatus` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "refundaddressid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `refundaddressid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "refundaddress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `refundaddress` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `content` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `reason` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `images` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "applytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `applytime` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "applycredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `applycredit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "applyprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `applyprice` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "reply")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `reply` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "refundtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `refundtype` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "rtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `rtype` int(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "refundtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `refundtime` varchar(45) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `endtime` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `message` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "operatetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `operatetime` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "realcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `realcredit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `realmoney` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `express` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `expresscom` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `expresssn` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "sendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `sendtime` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "returntime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `returntime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "rexpress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `rexpress` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "rexpresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `rexpresscom` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_order_refund", "rexpresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_order_refund")." ADD `rexpresssn` varchar(45) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "plid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `plid` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `type` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "acid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `acid` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `openid` varchar(40) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "tid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `tid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `credit` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "creditmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `creditmoney` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "fee")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `fee` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `status` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "module")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `module` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "tag")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `tag` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "is_usecard")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `is_usecard` tinyint(3) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "card_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `card_type` tinyint(3) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "card_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `card_id` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "card_fee")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `card_fee` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "encrypt_code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `encrypt_code` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_paylog", "uniontid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_paylog")." ADD `uniontid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `uniacid` varchar(45);");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "groups")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `groups` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "followurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `followurl` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "followqrcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `followqrcode` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "groupsurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `groupsurl` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `share_title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `share_icon` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `share_desc` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "share_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `share_url` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "groups_description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `groups_description` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `description` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "creditdeduct")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `creditdeduct` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "groupsdeduct")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `groupsdeduct` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `credit` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "groupsmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `groupsmoney` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "refund")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `refund` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "refundday")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `refundday` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `goodsid` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "rules")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `rules` text;");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "receive")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `receive` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `discount` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "headstype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `headstype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "headsmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `headsmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "headsdiscount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `headsdiscount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_set", "followbar")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_set")." ADD `followbar` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `openid` varchar(45) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "verifycode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `verifycode` varchar(45) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `storeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "verifier")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `verifier` varchar(45) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "isverify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `isverify` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_groups_verify", "verifytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_groups_verify")." ADD `verifytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_invitation", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_invitation", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_invitation", "scan")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `scan` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation", "follow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `follow` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation", "qrcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `qrcode` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `status` tinyint(3) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_invitation", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_invitation_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_log")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation_log", "invitation_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_log")." ADD `invitation_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_log")." ADD `openid` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_invitation_log", "invitation_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_log")." ADD `invitation_openid` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_invitation_log", "scan_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_log")." ADD `scan_time` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation_log", "follow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_log")." ADD `follow` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "acid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `acid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `openid` varchar(60) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "invitationid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `invitationid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "roomid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `roomid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "sceneid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `sceneid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "ticket")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `ticket` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `createtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "expire")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `expire` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_invitation_qr", "qrimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_invitation_qr")." ADD `qrimg` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "livetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `livetype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "liveidentity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `liveidentity` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "screen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `screen` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `goodsid` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "category")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `category` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `url` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `thumb` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "hot")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `hot` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "recommend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `recommend` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "living")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `living` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "livetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `livetime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "lastlivetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `lastlivetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `createtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "introduce")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `introduce` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "packetmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `packetmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_live", "packettotal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `packettotal` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "packetprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `packetprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_live", "packetdes")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `packetdes` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `couponid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `share_title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `share_icon` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `share_desc` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "share_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `share_url` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_live", "subscribe")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `subscribe` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "subscribenotice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `subscribenotice` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "visit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `visit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "video")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `video` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_live", "covertype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `covertype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "cover")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `cover` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_live", "iscoupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `iscoupon` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "nestable")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `nestable` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "tabs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `tabs` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "invitation_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `invitation_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "showlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `showlevels` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "showgroups")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `showgroups` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "showcommission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `showcommission` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "jurisdiction_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `jurisdiction_url` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "jurisdictionurl_show")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `jurisdictionurl_show` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live", "notice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `notice` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "notice_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `notice_url` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "followqrcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `followqrcode` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live", "coupon_num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live")." ADD `coupon_num` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_adv", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_adv")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_live_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_live_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_live_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `name` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_live_category", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `thumb` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_live_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `displayorder` tinyint(3) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_category", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `enabled` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_live_category", "advimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `advimg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_live_category", "advurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `advurl` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_live_category", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_category")." ADD `isrecommand` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_coupon", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_coupon")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_coupon", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_coupon")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_coupon", "roomid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_coupon")." ADD `roomid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_coupon", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_coupon")." ADD `couponid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_coupon", "coupontotal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_coupon")." ADD `coupontotal` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_coupon", "couponlimit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_coupon")." ADD `couponlimit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_favorite", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_favorite")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_favorite", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_favorite")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_favorite", "roomid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_favorite")." ADD `roomid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_favorite", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_favorite")." ADD `openid` tinytext NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live_favorite", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_favorite")." ADD `deleted` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_favorite", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_favorite")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_goods", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods")." ADD `goodsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_goods", "liveid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods")." ADD `liveid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_goods", "liveprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods")." ADD `liveprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_live_goods", "minliveprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods")." ADD `minliveprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_live_goods", "maxliveprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods")." ADD `maxliveprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_live_goods_option", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods_option")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_goods_option", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods_option")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_goods_option", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods_option")." ADD `goodsid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live_goods_option", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods_option")." ADD `optionid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_goods_option", "liveid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods_option")." ADD `liveid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_goods_option", "liveprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_goods_option")." ADD `liveprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_live_setting", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_setting")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_setting", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_setting")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_setting", "ismember")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_setting")." ADD `ismember` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_setting", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_setting")." ADD `share_title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live_setting", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_setting")." ADD `share_icon` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live_setting", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_setting")." ADD `share_desc` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live_setting", "share_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_setting")." ADD `share_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live_setting", "livenoticetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_setting")." ADD `livenoticetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_status", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_status")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_status", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_status")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_status", "roomid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_status")." ADD `roomid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_status", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_status")." ADD `starttime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_status", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_status")." ADD `endtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_view", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_view")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_live_view", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_view")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_view", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_view")." ADD `openid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_live_view", "roomid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_view")." ADD `roomid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_live_view", "viewing")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_live_view")." ADD `viewing` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery", "lottery_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `lottery_id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_lottery", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery", "lottery_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `lottery_title` varchar(150);");
}
if(!pdo_fieldexists("ewei_shop_lottery", "lottery_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `lottery_icon` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_lottery", "lottery_banner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `lottery_banner` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_lottery", "lottery_cannot")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `lottery_cannot` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_lottery", "lottery_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `lottery_type` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_lottery", "is_delete")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `is_delete` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery", "addtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `addtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_lottery", "lottery_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `lottery_data` text;");
}
if(!pdo_fieldexists("ewei_shop_lottery", "is_goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `is_goods` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery", "lottery_days")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `lottery_days` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery", "task_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `task_type` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery", "task_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `task_data` text;");
}
if(!pdo_fieldexists("ewei_shop_lottery", "start_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `start_time` int(11);");
}
if(!pdo_fieldexists("ewei_shop_lottery", "end_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `end_time` int(11);");
}
if(!pdo_fieldexists("ewei_shop_lottery", "award_start")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `award_start` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery", "award_end")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery")." ADD `award_end` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery_default", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_default")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_lottery_default", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_default")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery_default", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_default")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_lottery_default", "addtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_default")." ADD `addtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery_join", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_join")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_lottery_join", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_join")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery_join", "join_user")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_join")." ADD `join_user` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_lottery_join", "lottery_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_join")." ADD `lottery_id` int(11);");
}
if(!pdo_fieldexists("ewei_shop_lottery_join", "lottery_num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_join")." ADD `lottery_num` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery_join", "lottery_tag")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_join")." ADD `lottery_tag` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_lottery_join", "addtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_join")." ADD `addtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_lottery_log", "log_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_log")." ADD `log_id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_lottery_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_log")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_lottery_log", "lottery_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_log")." ADD `lottery_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery_log", "join_user")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_log")." ADD `join_user` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_lottery_log", "lottery_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_log")." ADD `lottery_data` text;");
}
if(!pdo_fieldexists("ewei_shop_lottery_log", "is_reward")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_log")." ADD `is_reward` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_lottery_log", "addtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_lottery_log")." ADD `addtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "merchant_no")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `merchant_no` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `username` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "password")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `password` varchar(32) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "salt")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `salt` varchar(8) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "contact_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `contact_name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "contact_mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `contact_mobile` varchar(16) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "contact_address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `contact_address` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `type` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `status` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `createtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "validitytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `validitytime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "industry")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `industry` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_mc_merchant", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_mc_merchant")." ADD `remark` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "groupid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `groupid` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `level` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "agentid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `agentid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `realname` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `mobile` varchar(11) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "pwd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `pwd` varchar(32) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "weixin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `weixin` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `createtime` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "agenttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `agenttime` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "isagent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `isagent` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "clickcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `clickcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "agentlevel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `agentlevel` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "noticeset")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `noticeset` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `nickname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "credit1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `credit1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member", "credit2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `credit2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member", "birthyear")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `birthyear` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "birthmonth")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `birthmonth` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "birthday")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `birthday` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "gender")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `gender` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "avatar")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `avatar` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "province")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `province` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "city")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `city` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "area")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `area` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "childtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `childtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "inviter")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `inviter` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "agentnotupgrade")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `agentnotupgrade` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "agentselectgoods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `agentselectgoods` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "agentblack")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `agentblack` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "fixagentid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `fixagentid` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `username` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "diymemberid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diymemberid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diymemberdataid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diymemberdataid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diymemberdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diymemberdata` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "diycommissionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diycommissionid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diycommissiondataid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diycommissiondataid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diycommissiondata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diycommissiondata` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "isblack")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `isblack` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diymemberfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diymemberfields` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "diycommissionfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diycommissionfields` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "commission_total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `commission_total` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member", "endtime2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `endtime2` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "ispartner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `ispartner` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "partnertime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `partnertime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "partnerstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `partnerstatus` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "partnerblack")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `partnerblack` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "partnerlevel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `partnerlevel` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "partnernotupgrade")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `partnernotupgrade` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diyglobonusid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyglobonusid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diyglobonusdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyglobonusdata` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "diyglobonusfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyglobonusfields` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "isaagent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `isaagent` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "aagentlevel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagentlevel` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "aagenttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagenttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "aagentstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagentstatus` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "aagentblack")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagentblack` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "aagentnotupgrade")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagentnotupgrade` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "aagenttype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagenttype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "aagentprovinces")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagentprovinces` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "aagentcitys")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagentcitys` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "aagentareas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `aagentareas` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "diyaagentid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyaagentid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diyaagentdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyaagentdata` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "diyaagentfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyaagentfields` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "salt")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `salt` varchar(32);");
}
if(!pdo_fieldexists("ewei_shop_member", "mobileverify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `mobileverify` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "mobileuser")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `mobileuser` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "carrier_mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `carrier_mobile` varchar(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "isauthor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `isauthor` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "authortime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `authortime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "authorstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `authorstatus` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "authorblack")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `authorblack` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "authorlevel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `authorlevel` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "authornotupgrade")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `authornotupgrade` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diyauthorid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyauthorid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diyauthordata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyauthordata` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "diyauthorfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyauthorfields` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "authorid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `authorid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "comefrom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `comefrom` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_member", "openid_qq")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `openid_qq` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member", "openid_wx")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `openid_wx` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member", "diymaxcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diymaxcredit` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "maxcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `maxcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "datavalue")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `datavalue` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "openid_wa")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `openid_wa` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member", "nickname_wechat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `nickname_wechat` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "avatar_wechat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `avatar_wechat` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "updateaddress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `updateaddress` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "membercardid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `membercardid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "membercardcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `membercardcode` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "membershipnumber")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `membershipnumber` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member", "membercardactive")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `membercardactive` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "idnumber")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `idnumber` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member", "wxcardupdatetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `wxcardupdatetime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "hasnewcoupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `hasnewcoupon` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "isheads")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `isheads` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "headsstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `headsstatus` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "headstime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `headstime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "headsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `headsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diyheadsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyheadsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member", "diyheadsdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyheadsdata` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "diyheadsfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `diyheadsfields` text;");
}
if(!pdo_fieldexists("ewei_shop_member", "applyagenttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member")." ADD `applyagenttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_address", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `openid` varchar(50) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `realname` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `mobile` varchar(11) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "province")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `province` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "city")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `city` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "area")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `area` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `address` varchar(300) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `isdefault` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "zipcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `zipcode` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "street")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `street` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "datavalue")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `datavalue` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "streetdatavalue")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `streetdatavalue` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "lng")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `lng` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_address", "lat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_address")." ADD `lat` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_card", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "card_style")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `card_style` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "sort_order")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `sort_order` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "shipping")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `shipping` tinyint(11);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "member_discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `member_discount` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "discount_rate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `discount_rate` decimal(10,1);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `discount` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "is_card_points")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `is_card_points` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "card_points")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `card_points` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "is_card_coupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `is_card_coupon` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "card_coupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `card_coupon` varchar(500);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "is_month_points")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `is_month_points` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "month_points")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `month_points` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "is_month_coupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `is_month_coupon` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "month_coupon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `month_coupon` varchar(500);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "validate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `validate` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `price` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "stock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `stock` int(10);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `status` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `description` text;");
}
if(!pdo_fieldexists("ewei_shop_member_card", "kefu_tel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `kefu_tel` varchar(100);");
}
if(!pdo_fieldexists("ewei_shop_member_card", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `create_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "sale_count")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `sale_count` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "del_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `del_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "isdelete")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `isdelete` tinyint(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "update_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `update_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "cardmodel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `cardmodel` int(2) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_card", "goodsids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card")." ADD `goodsids` text;");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "member_card_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `member_card_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "receive_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `receive_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `create_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `price` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "sendtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `sendtype` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "card_points")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `card_points` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "card_couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `card_couponid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_buysend", "card_couponcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_buysend")." ADD `card_couponcount` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "order_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `order_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "member_card_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `member_card_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "expire_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `expire_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "receive_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `receive_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `price` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "user_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `user_name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "telephone")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `telephone` varchar(32);");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "isdelete")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `isdelete` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "del_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `del_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_history", "pay_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_history")." ADD `pay_type` int(1);");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "member_card_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `member_card_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "receive_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `receive_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `create_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `price` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "validate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `validate` int(11) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "sendtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `sendtype` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "card_points")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `card_points` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "card_couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `card_couponid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_monthsend", "card_couponcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_monthsend")." ADD `card_couponcount` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "member_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `member_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "payment_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `payment_name` varchar(32);");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "telephone")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `telephone` varchar(32);");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "orderno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `orderno` varchar(30);");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `total` decimal(15,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `status` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "finishtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `finishtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "member_card_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `member_card_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "wxapp_prepay_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `wxapp_prepay_id` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "transid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `transid` varchar(32) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `paytype` varchar(32) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "apppay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `apppay` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "borrowopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `borrowopenid` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_member_card_order", "isborrow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_order")." ADD `isborrow` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "order_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `order_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "member_card_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `member_card_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "shipping")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `shipping` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "discount_rate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `discount_rate` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "order_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `order_price` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "dec_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `dec_price` decimal(11,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_card_uselog", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_card_uselog")." ADD `create_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `openid` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `total` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `marketprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `optionid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "diyformdataid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `diyformdataid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "diyformid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `diyformid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "selected")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `selected` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "selectedadd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `selectedadd` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_member_cart", "isnewstore")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_cart")." ADD `isnewstore` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `uid` int(11) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "credittype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `credittype` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `num` decimal(10,2) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "operator")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `operator` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `createtime` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `remark` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "module")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `module` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_credit_record", "presentcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_credit_record")." ADD `presentcredit` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `goodsid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `type` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `marketprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_favorite", "productprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_favorite")." ADD `productprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_group", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_group", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_group", "groupname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group")." ADD `groupname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_group", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group")." ADD `description` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_group_log", "log_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group_log")." ADD `log_id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_group_log", "mid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group_log")." ADD `mid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_group_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group_log")." ADD `openid` varchar(50) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_group_log", "group_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group_log")." ADD `group_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_group_log", "add_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group_log")." ADD `add_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_member_group_log", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_group_log")." ADD `content` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_history", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_history")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_history", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_history")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_history", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_history")." ADD `goodsid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_history", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_history")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_history", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_history")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_history", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_history")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_history", "times")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_history")." ADD `times` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_history", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_history")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_level", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_level", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `level` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "levelname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `levelname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `ordermoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "ordercount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `ordercount` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `discount` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `enabled` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "enabledadd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `enabledadd` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "buygoods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `buygoods` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_level", "goodsids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_level")." ADD `goodsids` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `type` tinyint(3) COMMENT '0 充值 1 提现';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "logno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `logno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `status` int(11) DEFAULT '0' COMMENT '0 生成 1 成功 2 失败';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "rechargetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `rechargetype` varchar(255) DEFAULT '' COMMENT '充值类型';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "gives")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `gives` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_member_log", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "transid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `transid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "realmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `realmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "charge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `charge` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "deductionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `deductionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "isborrow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `isborrow` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "borrowopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `borrowopenid` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `remark` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "apppay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `apppay` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "alipay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `alipay` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "bankname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `bankname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "bankcard")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `bankcard` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `realname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "applytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `applytype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "sendmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `sendmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_member_log", "senddata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `senddata` text;");
}
if(!pdo_fieldexists("ewei_shop_member_log", "bankopen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_log")." ADD `bankopen` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "mergetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `mergetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "openid_a")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `openid_a` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "openid_b")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `openid_b` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "mid_a")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `mid_a` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "mid_b")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `mid_b` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "detail_a")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `detail_a` text;");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "detail_b")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `detail_b` text;");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "detail_c")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `detail_c` text;");
}
if(!pdo_fieldexists("ewei_shop_member_mergelog", "fromuniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_mergelog")." ADD `fromuniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "template_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `template_id` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "first")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `first` text NOT NULL COMMENT '键名';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "firstcolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `firstcolor` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `data` text NOT NULL COMMENT '颜色';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `remark` text NOT NULL COMMENT '键值';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "remarkcolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `remarkcolor` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "sendtimes")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `sendtimes` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "sendcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `sendcount` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "typecode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `typecode` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "messagetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `messagetype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template", "send_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template")." ADD `send_desc` text;");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_default", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_default")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_default", "typecode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_default")." ADD `typecode` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_default", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_default")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_default", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_default")." ADD `templateid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "typecode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `typecode` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "templatecode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `templatecode` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `templateid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "templatename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `templatename` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `content` varchar(1000);");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "showtotaladd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `showtotaladd` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "typegroup")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `typegroup` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_message_template_type", "groupname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_message_template_type")." ADD `groupname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_printer", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_printer", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_printer", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer", "print_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer")." ADD `print_data` text;");
}
if(!pdo_fieldexists("ewei_shop_member_printer", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "print_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `print_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "print_style")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `print_style` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "print_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `print_data` text;");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `code` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "qrcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `qrcode` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `goodssn` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "productsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `productsn` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "tel_code_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `tel_code_type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_printer_template", "ordersn_code_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_printer_template")." ADD `ordersn_code_type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_rank", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_rank")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_rank", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_rank")." ADD `uniacid` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_rank", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_rank")." ADD `status` tinyint(4) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_rank", "num")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_rank")." ADD `num` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_default", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_default")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_default", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_default")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_default", "typecode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_default")." ADD `typecode` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_default", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_default")." ADD `templateid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_default", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_default")." ADD `datas` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_type", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_type")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_type", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_type")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_type", "typecode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_type")." ADD `typecode` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_type", "templatecode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_type")." ADD `templatecode` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_type", "templatename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_type")." ADD `templatename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_type", "keyword_id_list")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_type")." ADD `keyword_id_list` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_type", "typegroup")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_type")." ADD `typegroup` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_member_wxapp_message_template_type", "groupname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_member_wxapp_message_template_type")." ADD `groupname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `username` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "pwd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `pwd` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "salt")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `salt` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "perms")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `perms` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "isfounder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `isfounder` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "lastip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `lastip` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "lastvisit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `lastvisit` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_account", "roleid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_account")." ADD `roleid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_adv")." ADD `advname` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_merch_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_adv")." ADD `link` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_merch_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_adv")." ADD `thumb` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_merch_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_adv")." ADD `displayorder` int(11);");
}
if(!pdo_fieldexists("ewei_shop_merch_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_adv")." ADD `enabled` int(11);");
}
if(!pdo_fieldexists("ewei_shop_merch_adv", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_adv")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_banner", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_banner")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_banner", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_banner")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_banner", "bannername")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_banner")." ADD `bannername` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_banner", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_banner")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_banner", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_banner")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_banner", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_banner")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_banner", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_banner")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_banner", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_banner")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "applyno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `applyno` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "orderids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `orderids` longtext NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "realprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `realprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "realpricerate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `realpricerate` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "finalprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `finalprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "payrateprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `payrateprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "payrate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `payrate` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "applytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `applytime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "checktime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `checktime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `paytime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "invalidtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `invalidtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "refusetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `refusetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `remark` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "ordernum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `ordernum` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "orderprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `orderprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "passrealprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `passrealprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "passrealpricerate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `passrealpricerate` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "passorderids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `passorderids` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "passordernum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `passordernum` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "passorderprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `passorderprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "alipay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `alipay` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "bankname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `bankname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "bankcard")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `bankcard` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "applyrealname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `applyrealname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "applytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `applytype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "handpay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `handpay` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "creditstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `creditstatus` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "creditrate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `creditrate` int(10) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "creditnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `creditnum` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "creditmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `creditmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "passcreditnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `passcreditnum` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "passcreditmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `passcreditmoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "isbillcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `isbillcredit` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill", "bankopen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill")." ADD `bankopen` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill_select", "bill_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill_select")." ADD `bill_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_bill_select", "order_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_bill_select")." ADD `order_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_billo", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_billo")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_billo", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_billo")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_billo", "billid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_billo")." ADD `billid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_billo", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_billo")." ADD `orderid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_billo", "ordermoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_billo")." ADD `ordermoney` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category", "catename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category")." ADD `catename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_category", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category")." ADD `thumb` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_category", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category")." ADD `isrecommand` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category_swipe", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category_swipe")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_category_swipe", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category_swipe")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category_swipe", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category_swipe")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_category_swipe", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category_swipe")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category_swipe", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category_swipe")." ADD `status` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category_swipe", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category_swipe")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_category_swipe", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_category_swipe")." ADD `thumb` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "clearno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `clearno` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "goodsprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `goodsprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "dispatchprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `dispatchprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "deductprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `deductprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "deductcredit2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `deductcredit2` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "discountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `discountprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "deductenough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `deductenough` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "merchdeductenough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `merchdeductenough` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "isdiscountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `isdiscountprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `createtime` int(10) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `starttime` int(10) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `endtime` int(10) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "realprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `realprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "realpricerate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `realpricerate` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "finalprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `finalprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `remark` varchar(2000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `paytime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_clearing", "payrate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_clearing")." ADD `payrate` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_commission_orderprice", "order_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_commission_orderprice")." ADD `order_id` int(11) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_merch_commission_orderprice", "commission_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_commission_orderprice")." ADD `commission_price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "groupname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `groupname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `isdefault` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "goodschecked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `goodschecked` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "commissionchecked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `commissionchecked` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "changepricechecked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `changepricechecked` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_group", "finishchecked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_group")." ADD `finishchecked` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_nav", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_nav")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_nav", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_nav")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_nav", "navname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_nav")." ADD `navname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_nav", "icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_nav")." ADD `icon` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_nav", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_nav")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_nav", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_nav")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_nav", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_nav")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_nav", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_nav")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "detail")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `detail` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_merch_notice", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_notice")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `type` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "op")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `op` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "ip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `ip` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_log", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_log")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_role", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_role")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_role", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_role")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_role", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_role")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_role", "rolename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_role")." ADD `rolename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_role", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_role")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_role", "perms")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_role")." ADD `perms` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_perm_role", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_perm_role")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "merchname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `merchname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "salecate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `salecate` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `desc` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `realname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "applytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `applytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `reason` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "uname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `uname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_reg", "upass")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_reg")." ADD `upass` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_saler", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_saler")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_saler", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_saler")." ADD `storeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_saler", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_saler")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_saler", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_saler")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_saler", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_saler")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_saler", "salername")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_saler")." ADD `salername` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_saler", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_saler")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "storename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `storename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `address` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "tel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `tel` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "lat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `lat` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "lng")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `lng` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `type` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `realname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "fetchtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `fetchtime` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `logo` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "saletime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `saletime` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `desc` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "commission_total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `commission_total` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_merch_store", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_store")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "regid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `regid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "groupid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `groupid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "merchno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `merchno` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "merchname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `merchname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "salecate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `salecate` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `desc` varchar(500) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `realname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `mobile` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "accounttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `accounttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "applytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `applytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "accounttotal")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `accounttotal` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `remark` text;");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "jointime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `jointime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "accountid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `accountid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "sets")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `sets` mediumtext;");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `logo` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "payopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `payopenid` varchar(32) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "payrate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `payrate` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `isrecommand` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "cateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `cateid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `address` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "tel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `tel` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "lat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `lat` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "lng")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `lng` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "pluginset")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `pluginset` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "uname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `uname` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "upass")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `upass` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "maxgoods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `maxgoods` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "iscredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `iscredit` tinyint(3) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "creditrate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `creditrate` int(10) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "iscreditmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `iscreditmoney` int(3) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "can_import")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `can_import` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "can_edit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `can_edit` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_merch_user", "apikey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_merch_user")." ADD `apikey` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "company")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `company` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "sales")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `sales` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `starttime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "applytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `applytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "jointime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `jointime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_multi_shop", "refusecontent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_multi_shop")." ADD `refusecontent` text;");
}
if(!pdo_fieldexists("ewei_shop_nav", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_nav")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_nav", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_nav")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_nav", "navname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_nav")." ADD `navname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_nav", "icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_nav")." ADD `icon` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_nav", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_nav")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_nav", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_nav")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_nav", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_nav")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_nav", "iswxapp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_nav")." ADD `iswxapp` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_newstore_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_newstore_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_newstore_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_newstore_category")." ADD `name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_newstore_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_newstore_category")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_notice", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_notice", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_notice", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_notice", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_notice", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_notice", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_notice", "detail")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `detail` text;");
}
if(!pdo_fieldexists("ewei_shop_notice", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_notice", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_notice", "shopid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `shopid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_notice", "iswxapp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_notice")." ADD `iswxapp` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_open_api_app", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_app")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_open_api_app", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_app")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_open_api_app", "api_key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_app")." ADD `api_key` char(32) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_open_api_app", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_app")." ADD `name` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_open_api_app", "request_count")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_app")." ADD `request_count` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_open_api_app", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_app")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_open_api_app", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_app")." ADD `create_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "app_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `app_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "api_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `api_type` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "request_path")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `request_path` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "request_params")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `request_params` text;");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "request_status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `request_status` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "response_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `response_content` text;");
}
if(!pdo_fieldexists("ewei_shop_open_api_log", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_api_log")." ADD `create_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_open_plugin", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_plugin")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_open_plugin", "plugin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_plugin")." ADD `plugin` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_open_plugin", "key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_plugin")." ADD `key` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_open_plugin", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_plugin")." ADD `status` int(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_open_plugin", "expirtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_plugin")." ADD `expirtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_open_plugin", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_plugin")." ADD `url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_open_plugin", "domain")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_open_plugin")." ADD `domain` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "agentid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `agentid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "ordersn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `ordersn` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "goodsprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `goodsprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "discountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `discountprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `paytype` tinyint(1) DEFAULT '0' COMMENT '1为余额2为在线3为到付';");
}
if(!pdo_fieldexists("ewei_shop_order", "transid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `transid` varchar(30) DEFAULT '0' COMMENT '微信支付单号';");
}
if(!pdo_fieldexists("ewei_shop_order", "remark")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `remark` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "addressid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `addressid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dispatchprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dispatchprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "dispatchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dispatchid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `createtime` int(10);");
}
if(!pdo_fieldexists("ewei_shop_order", "dispatchtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dispatchtype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "carrier")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `carrier` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "refundid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `refundid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "iscomment")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `iscomment` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "creditadd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `creditadd` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "userdeleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `userdeleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "finishtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `finishtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `paytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `expresscom` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `expresssn` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `express` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "sendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `sendtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "fetchtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `fetchtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "cash")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `cash` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "canceltime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `canceltime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_order", "cancelpaytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `cancelpaytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "refundtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `refundtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "isverify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isverify` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "verified")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verified` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "verifyopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verifyopenid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "verifycode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verifycode` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "verifytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verifytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "verifystoreid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verifystoreid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "deductprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `deductprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "deductcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `deductcredit` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "deductcredit2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `deductcredit2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "deductenough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `deductenough` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "virtual")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `virtual` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "virtual_info")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `virtual_info` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "virtual_str")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `virtual_str` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `address` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "sysdeleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `sysdeleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "ordersn2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `ordersn2` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "changeprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `changeprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "changedispatchprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `changedispatchprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "oldprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `oldprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "olddispatchprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `olddispatchprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "isvirtual")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isvirtual` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "couponprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `couponprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "diyformid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `diyformid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `storeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "closereason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `closereason` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "remarksaler")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `remarksaler` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "printstate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `printstate` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "printstate2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `printstate2` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "address_send")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `address_send` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "refundstate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `refundstate` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "remarkclose")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `remarkclose` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "remarksend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `remarksend` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "ismr")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `ismr` int(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "isdiscountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isdiscountprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "isvirtualsend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isvirtualsend` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "virtualsend_info")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `virtualsend_info` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "verifyinfo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verifyinfo` longtext;");
}
if(!pdo_fieldexists("ewei_shop_order", "verifytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verifytype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "verifycodes")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verifycodes` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "invoicename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `invoicename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "ismerch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `ismerch` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "parentid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `parentid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "isparent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isparent` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "grprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `grprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "merchshow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `merchshow` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "merchdeductenough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `merchdeductenough` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "couponmerchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `couponmerchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "isglobonus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isglobonus` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "merchapply")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `merchapply` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "isabonus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isabonus` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "isborrow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isborrow` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "borrowopenid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `borrowopenid` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "merchisdiscountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `merchisdiscountprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "apppay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `apppay` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "coupongoodprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `coupongoodprice` decimal(10,2) DEFAULT '1.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "buyagainprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `buyagainprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "ispackage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `ispackage` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "packageid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `packageid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "taskdiscountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `taskdiscountprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "seckilldiscountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `seckilldiscountprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "verifyendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `verifyendtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "willcancelmessage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `willcancelmessage` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "sendtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `sendtype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "lotterydiscountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `lotterydiscountprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "contype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `contype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "wxid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `wxid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "wxcardid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `wxcardid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "wxcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `wxcode` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "dispatchkey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dispatchkey` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "quickid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `quickid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "istrade")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `istrade` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "isnewstore")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isnewstore` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "liveid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `liveid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order", "ordersn_trade")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `ordersn_trade` varchar(32) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order", "tradestatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `tradestatus` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "tradepaytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `tradepaytype` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order", "tradepaytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `tradepaytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dowpayment")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dowpayment` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "betweenprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `betweenprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "isshare")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `isshare` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "officcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `officcode` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "wxapp_prepay_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `wxapp_prepay_id` varchar(100);");
}
if(!pdo_fieldexists("ewei_shop_order", "iswxappcreate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `iswxappcreate` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "cashtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `cashtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "random_code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `random_code` varchar(4);");
}
if(!pdo_fieldexists("ewei_shop_order", "print_template")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `print_template` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "city_express_state")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `city_express_state` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "is_cashier")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `is_cashier` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "commissionmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `commissionmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order", "iscycelbuy")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `iscycelbuy` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "cycelbuy_predict_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `cycelbuy_predict_time` int(11);");
}
if(!pdo_fieldexists("ewei_shop_order", "cycelbuy_periodic")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `cycelbuy_periodic` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_order", "invoice_img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `invoice_img` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order", "headsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `headsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dividend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dividend` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "dividend_applytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dividend_applytime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dividend_checktime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dividend_checktime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dividend_paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dividend_paytime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dividend_invalidtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dividend_invalidtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dividend_deletetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dividend_deletetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dividend_status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dividend_status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "dividend_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `dividend_content` text;");
}
if(!pdo_fieldexists("ewei_shop_order", "wxapp_allow_subscribe")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `wxapp_allow_subscribe` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_order", "willcloseverifymessage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `willcloseverifymessage` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order", "is_wxapp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order")." ADD `is_wxapp` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_buysend", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_buysend")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_buysend", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_buysend")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_buysend", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_buysend")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_buysend", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_buysend")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_buysend", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_buysend")." ADD `credit` float(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_buysend", "money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_buysend")." ADD `money` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_buysend", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_buysend")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `openid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `nickname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "headimgurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `headimgurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `level` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `content` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `images` text;");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "append_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `append_content` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "append_images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `append_images` text;");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "reply_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `reply_content` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "reply_images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `reply_images` text;");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "append_reply_content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `append_reply_content` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "append_reply_images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `append_reply_images` text;");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "istop")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `istop` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "checked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `checked` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_comment", "replychecked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_comment")." ADD `replychecked` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `total` int(11) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `optionid` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "optionname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `optionname` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "commission1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `commission1` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "applytime1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `applytime1` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "checktime1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `checktime1` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "paytime1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `paytime1` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "invalidtime1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `invalidtime1` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "deletetime1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `deletetime1` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "status1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `status1` tinyint(3) DEFAULT '0' COMMENT '申请状态,-2删除-1无效0未申请1申请2审核通过 3已打款';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "content1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `content1` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "commission2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `commission2` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "applytime2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `applytime2` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "checktime2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `checktime2` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "paytime2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `paytime2` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "invalidtime2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `invalidtime2` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "deletetime2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `deletetime2` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "status2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `status2` tinyint(3) DEFAULT '0' COMMENT '申请状态,-2删除-1无效0未申请1申请2审核通过 3已打款';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "content2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `content2` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "commission3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `commission3` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "applytime3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `applytime3` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "checktime3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `checktime3` int(10) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "paytime3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `paytime3` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "invalidtime3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `invalidtime3` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "deletetime3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `deletetime3` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "status3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `status3` tinyint(3) DEFAULT '0' COMMENT '申请状态,-2删除-1无效0未申请1申请2审核通过 3已打款';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "content3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `content3` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "realprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `realprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `goodssn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "productsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `productsn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "nocommission")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `nocommission` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "changeprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `changeprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "oldprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `oldprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "commissions")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `commissions` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "diyformdataid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `diyformdataid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "diyformid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `diyformid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "rstate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `rstate` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "refundtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `refundtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "printstate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `printstate` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "printstate2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `printstate2` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "parentorderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `parentorderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "merchsale")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `merchsale` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "isdiscountprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `isdiscountprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "canbuyagain")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `canbuyagain` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "seckill")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `seckill` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "seckill_taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `seckill_taskid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "seckill_roomid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `seckill_roomid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "seckill_timeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `seckill_timeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "sendtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `sendtype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `expresscom` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `expresssn` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `express` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "sendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `sendtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "finishtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `finishtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "remarksend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `remarksend` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "prohibitrefund")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `prohibitrefund` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `storeid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "trade_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `trade_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "optime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `optime` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "tdate_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `tdate_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "dowpayment")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `dowpayment` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "peopleid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `peopleid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "esheetprintnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `esheetprintnum` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "ordercode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `ordercode` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "consume")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `consume` text;");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "single_refundid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `single_refundid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "single_refundstate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `single_refundstate` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "single_refundtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `single_refundtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_goods", "fullbackid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_goods")." ADD `fullbackid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `orderid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "peerpay_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `peerpay_type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "peerpay_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `peerpay_price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "peerpay_maxprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `peerpay_maxprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "peerpay_realprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `peerpay_realprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "peerpay_selfpay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `peerpay_selfpay` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "peerpay_message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `peerpay_message` varchar(500) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay")." ADD `createtime` int(10) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "pid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `pid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `uid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "uname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `uname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "usay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `usay` varchar(500) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "headimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `headimg` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "refundstatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `refundstatus` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "refundprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `refundprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "tid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `tid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_peerpay_payinfo", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_peerpay_payinfo")." ADD `paytype` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_print", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_print")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_print", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_print")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_print", "sid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_print")." ADD `sid` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_print", "foid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_print")." ADD `foid` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_print", "oid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_print")." ADD `oid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_print", "pid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_print")." ADD `pid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_print", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_print")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_print", "addtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_print")." ADD `addtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_query", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "out_trade_no")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `out_trade_no` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "transaction_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `transaction_id` varchar(60) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "total_fee")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `total_fee` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "time_end")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `time_end` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `status` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `create_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "apply_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `apply_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_query", "check_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `check_time` int(11);");
}
if(!pdo_fieldexists("ewei_shop_order_query", "withdraw_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_query")." ADD `withdraw_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "refundno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `refundno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `price` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `reason` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `images` text;");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `status` tinyint(3) DEFAULT '0' COMMENT '0申请 1 通过 2 驳回';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "reply")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `reply` text;");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "refundtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `refundtype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "realprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `realprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "refundtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `refundtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "orderprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `orderprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "applyprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `applyprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "imgs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `imgs` text;");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "rtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `rtype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "refundaddress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `refundaddress` text;");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `message` text;");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `express` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `expresscom` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `expresssn` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "operatetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `operatetime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "sendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `sendtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "returntime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `returntime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "rexpress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `rexpress` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "rexpresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `rexpresscom` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "rexpresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `rexpresssn` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "refundaddressid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `refundaddressid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_refund", "ordergoodsids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_refund")." ADD `ordergoodsids` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "ordergoodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `ordergoodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "refundno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `refundno` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `price` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "reason")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `reason` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `images` text;");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "reply")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `reply` text;");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "refundtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `refundtype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "realprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `realprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "refundtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `refundtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "ordergoodsrealprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `ordergoodsrealprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "applyprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `applyprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "imgs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `imgs` text;");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "rtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `rtype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "refundaddress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `refundaddress` text;");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "message")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `message` text;");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "express")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `express` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "expresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `expresscom` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "expresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `expresssn` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "operatetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `operatetime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "sendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `sendtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "returntime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `returntime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "rexpress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `rexpress` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "rexpresscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `rexpresscom` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "rexpresssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `rexpresssn` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "refundaddressid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `refundaddressid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "tradetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `tradetype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "issuporder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `issuporder` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_single_refund", "suptype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_single_refund")." ADD `suptype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "apply_ids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `apply_ids` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `create_time` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `openid` varchar(60) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "id_number")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `id_number` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "real_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `real_name` varchar(60) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "total_money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `total_money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_order_withdraw_apply", "check_money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_order_withdraw_apply")." ADD `check_money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_package", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package", "freight")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `freight` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `starttime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `endtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `goodsid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package", "cash")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `cash` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `share_title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `share_icon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `share_desc` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `deleted` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package", "dispatchtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package")." ADD `dispatchtype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "pid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `pid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `goodsid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "option")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `option` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "goodssn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `goodssn` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "productsn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `productsn` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "hasoption")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `hasoption` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `marketprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "packageprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `packageprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "commission1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `commission1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "commission2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `commission2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods", "commission3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods")." ADD `commission3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `goodsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `optionid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "pid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `pid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "packageprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `packageprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `marketprice` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "commission1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `commission1` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "commission2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `commission2` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_package_goods_option", "commission3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_package_goods_option")." ADD `commission3` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_payment", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_payment", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_payment", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_payment", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `type` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_payment", "appid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `appid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_payment", "mch_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `mch_id` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_payment", "apikey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `apikey` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_payment", "sub_appid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `sub_appid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_payment", "sub_appsecret")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `sub_appsecret` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_payment", "sub_mch_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `sub_mch_id` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_payment", "cert_file")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `cert_file` text;");
}
if(!pdo_fieldexists("ewei_shop_payment", "key_file")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `key_file` text;");
}
if(!pdo_fieldexists("ewei_shop_payment", "root_file")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `root_file` text;");
}
if(!pdo_fieldexists("ewei_shop_payment", "is_raw")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `is_raw` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_payment", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `createtime` int(10) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_payment", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `paytype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_payment", "alitype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `alitype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_payment", "alipay_sec")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `alipay_sec` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_payment", "qpay_signtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `qpay_signtype` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_payment", "app_qpay_public_key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `app_qpay_public_key` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_payment", "app_qpay_private_key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_payment")." ADD `app_qpay_private_key` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `uniacid` int(11) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `advname` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "src")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `src` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "alt")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `alt` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `enabled` tinyint(3) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `link` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "width")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `width` int(11) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "height")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `height` int(11) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_adv", "settings")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_adv")." ADD `settings` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_browse_history", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_browse_history")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_pc_browse_history", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_browse_history")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_browse_history", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_browse_history")." ADD `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_browse_history", "history")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_browse_history")." ADD `history` text;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "temp_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `temp_id` varchar(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `uniacid` varchar(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "import_image")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `import_image` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "import_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `import_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "goods_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `goods_type` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "goods_info")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `goods_info` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "top_image")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `top_image` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "top_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `top_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "bottom_image")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `bottom_image` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "bottom_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `bottom_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "sort")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `sort` int(20) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `status` int(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `create_time` varchar(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "goodsid_text")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `goodsid_text` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_goods", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_goods")." ADD `description` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_link", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_link")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_pc_link", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_link")." ADD `uniacid` int(11) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_link", "linkname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_link")." ADD `linkname` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_link", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_link")." ADD `url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_link", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_link")." ADD `status` tinyint(3) unsigned NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_pc_link", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_link")." ADD `displayorder` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `uniacid` int(11) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `type` int(11) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `displayorder` int(11) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `enabled` tinyint(3) unsigned DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `createtime` int(11) unsigned;");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `status` tinyint(3) unsigned DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_pc_menu", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_menu")." ADD `create_time` int(11) unsigned;");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `uniacid` int(11) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `type` int(11) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "backcolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `backcolor` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_slide", "shopid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_slide")." ADD `shopid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_template", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_template")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_pc_template", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_template")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_pc_template", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_template")." ADD `status` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_pc_template", "setting")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_template")." ADD `setting` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_pc_template", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_template")." ADD `create_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_template", "update_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_template")." ADD `update_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_pc_template", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_pc_template")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_perm_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_perm_log", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_log")." ADD `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_log", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_log")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_perm_log", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_log")." ADD `type` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_perm_log", "op")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_log")." ADD `op` text;");
}
if(!pdo_fieldexists("ewei_shop_perm_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_log", "ip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_log")." ADD `ip` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_perm_plugin", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_plugin")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_perm_plugin", "acid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_plugin")." ADD `acid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_plugin", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_plugin")." ADD `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_plugin", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_plugin")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_plugin", "plugins")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_plugin")." ADD `plugins` text;");
}
if(!pdo_fieldexists("ewei_shop_perm_plugin", "coms")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_plugin")." ADD `coms` text;");
}
if(!pdo_fieldexists("ewei_shop_perm_plugin", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_plugin")." ADD `datas` text;");
}
if(!pdo_fieldexists("ewei_shop_perm_role", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_role")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_perm_role", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_role")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_role", "rolename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_role")." ADD `rolename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_perm_role", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_role")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_role", "perms")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_role")." ADD `perms` text;");
}
if(!pdo_fieldexists("ewei_shop_perm_role", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_role")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_role", "perms2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_role")." ADD `perms2` text;");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `uid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `username` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "password")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `password` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "roleid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `roleid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `status` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "perms")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `perms` text;");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `realname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "perms2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `perms2` text;");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `openid` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "openid_wa")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `openid_wa` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_perm_user", "member_nick")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_perm_user")." ADD `member_nick` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_plugin", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_plugin", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "identity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `identity` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `name` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "version")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `version` varchar(10) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "author")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `author` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `status` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "category")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `category` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "iscom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `iscom` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `desc` text;");
}
if(!pdo_fieldexists("ewei_shop_plugin", "deprecated")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `deprecated` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "isv2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `isv2` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_plugin", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_plugin")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "appkey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `appkey` varchar(200) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "token")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `token` varchar(200) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "appsecret")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `appsecret` varchar(200) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "updatetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `updatetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_polyapi_key", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_polyapi_key")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_poster", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `type` tinyint(3) DEFAULT '0' COMMENT '1 首页 2 小店 3 商城 4 自定义';");
}
if(!pdo_fieldexists("ewei_shop_poster", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "bg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `bg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_poster", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `keyword` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "times")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `times` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "follows")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `follows` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `isdefault` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "resptitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `resptitle` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "respthumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `respthumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "respdesc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `respdesc` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "respurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `respurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "waittext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `waittext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "oktext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `oktext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "subcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `subcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "submoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `submoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_poster", "reccredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `reccredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "recmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `recmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_poster", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `paytype` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "scantext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `scantext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "subtext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `subtext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "beagent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `beagent` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "bedown")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `bedown` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "isopen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `isopen` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "opentext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `opentext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "openurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `openurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `templateid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "subpaycontent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `subpaycontent` text;");
}
if(!pdo_fieldexists("ewei_shop_poster", "recpaycontent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `recpaycontent` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "entrytext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `entrytext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "reccouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `reccouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "reccouponnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `reccouponnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "subcouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `subcouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "subcouponnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `subcouponnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "keyword2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `keyword2` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "resptype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `resptype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "resptext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `resptext` text;");
}
if(!pdo_fieldexists("ewei_shop_poster", "resptext11")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `resptext11` text;");
}
if(!pdo_fieldexists("ewei_shop_poster", "reward_totle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `reward_totle` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster", "ismembergroup")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `ismembergroup` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster", "membergroupid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster")." ADD `membergroupid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "posterid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `posterid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "from_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `from_openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "subcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `subcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "submoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `submoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "reccredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `reccredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "recmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `recmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "reccouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `reccouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "reccouponnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `reccouponnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "subcouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `subcouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_log", "subcouponnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_log")." ADD `subcouponnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "acid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `acid` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "sceneid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `sceneid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "mediaid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `mediaid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "ticket")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `ticket` varchar(250) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `url` varchar(80) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `createtime` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "qrimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `qrimg` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "scenestr")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `scenestr` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster_qr", "posterid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_qr")." ADD `posterid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_scan", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_scan")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_poster_scan", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_scan")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_scan", "posterid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_scan")." ADD `posterid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_poster_scan", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_scan")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster_scan", "from_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_scan")." ADD `from_openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_poster_scan", "scantime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_poster_scan")." ADD `scantime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_postera", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `type` tinyint(3) DEFAULT '0' COMMENT '1 首页 2 小店 3 商城 4 自定义';");
}
if(!pdo_fieldexists("ewei_shop_postera", "days")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `days` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "bg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `bg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_postera", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `keyword` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `isdefault` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "resptitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `resptitle` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "respthumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `respthumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "respdesc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `respdesc` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "respurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `respurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "waittext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `waittext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "oktext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `oktext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "subcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `subcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "submoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `submoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_postera", "reccredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `reccredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "recmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `recmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_postera", "scantext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `scantext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "subtext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `subtext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "beagent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `beagent` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "bedown")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `bedown` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "isopen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `isopen` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "opentext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `opentext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "openurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `openurl` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `paytype` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "subpaycontent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `subpaycontent` text;");
}
if(!pdo_fieldexists("ewei_shop_postera", "recpaycontent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `recpaycontent` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `templateid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "entrytext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `entrytext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "reccouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `reccouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "reccouponnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `reccouponnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "subcouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `subcouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "subcouponnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `subcouponnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "timestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `timestart` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "timeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `timeend` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "keyword2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `keyword2` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "resptype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `resptype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "resptext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `resptext` text;");
}
if(!pdo_fieldexists("ewei_shop_postera", "starttext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `starttext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera", "endtext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `endtext` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_postera", "testflag")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `testflag` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera", "reward_totle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera")." ADD `reward_totle` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "posterid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `posterid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "from_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `from_openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "subcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `subcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "submoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `submoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "reccredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `reccredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "recmoney")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `recmoney` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "reccouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `reccouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "reccouponnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `reccouponnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "subcouponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `subcouponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_log", "subcouponnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_log")." ADD `subcouponnum` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "acid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `acid` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "posterid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `posterid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "sceneid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `sceneid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "mediaid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `mediaid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "ticket")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `ticket` varchar(250) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `url` varchar(80) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `createtime` int(10) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "qrimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `qrimg` varchar(1000) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "expire")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `expire` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `endtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_postera_qr", "qrtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_postera_qr")." ADD `qrtime` varchar(32);");
}
if(!pdo_fieldexists("ewei_shop_print", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_print", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_print", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `name` varchar(200) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_print", "print_no")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `print_no` varchar(200) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_print", "key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `key` varchar(200) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_print", "print_nums")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `print_nums` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_print", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_print", "sid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `sid` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_print", "print_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `print_type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_print", "qrcode_link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_print")." ADD `qrcode_link` varchar(200) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_qa_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_qa_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_category")." ADD `name` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_qa_category", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_category")." ADD `thumb` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_qa_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_category")." ADD `displayorder` tinyint(3) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_category", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_category")." ADD `enabled` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_qa_category", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_category")." ADD `isrecommand` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `cate` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "keywords")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `keywords` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `content` mediumtext NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `isrecommand` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_question", "lastedittime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_question")." ADD `lastedittime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "showmember")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `showmember` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "showtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `showtype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `keyword` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "enter_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `enter_title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "enter_img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `enter_img` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "enter_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `enter_desc` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_qa_set", "share")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_qa_set")." ADD `share` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_queue", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_queue", "channel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `channel` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_queue", "job")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `job` blob NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_queue", "pushed_at")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `pushed_at` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_queue", "ttr")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `ttr` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_queue", "delay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `delay` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_queue", "priority")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `priority` int(11) unsigned NOT NULL DEFAULT '1024';");
}
if(!pdo_fieldexists("ewei_shop_queue", "reserved_at")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `reserved_at` int(11);");
}
if(!pdo_fieldexists("ewei_shop_queue", "attempt")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `attempt` int(11);");
}
if(!pdo_fieldexists("ewei_shop_queue", "done_at")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_queue")." ADD `done_at` int(11);");
}
if(!pdo_fieldexists("ewei_shop_quick", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_quick", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_quick", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_quick", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `keyword` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_quick", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `datas` mediumtext;");
}
if(!pdo_fieldexists("ewei_shop_quick", "cart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `cart` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_quick", "lasttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `lasttime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_quick", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `share_title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_quick", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `share_desc` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_quick", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `share_icon` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_quick", "enter_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `enter_title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_quick", "enter_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `enter_desc` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_quick", "enter_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `enter_icon` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_quick", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_quick_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_adv", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_adv")." ADD `merchid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_quick_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_quick_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_quick_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "quickid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `quickid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `openid` varchar(100) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `total` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "marketprice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `marketprice` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `optionid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "diyformdataid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `diyformdataid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "diyformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `diyformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "diyformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `diyformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "diyformid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `diyformid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "selected")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `selected` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_quick_cart", "selectedadd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_quick_cart")." ADD `selectedadd` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `openid` varchar(50) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `title` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `name` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "tel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `tel` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `mobile` varchar(11) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "province")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `province` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "city")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `city` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "area")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `area` varchar(30) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `address` varchar(300) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `isdefault` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "zipcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `zipcode` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `deleted` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_refund_address", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_refund_address")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon")." ADD `type` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon", "ckey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon")." ADD `ckey` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon", "cvalue")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon")." ADD `cvalue` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon", "nums")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon")." ADD `nums` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon_data", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon_data")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon_data", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon_data")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon_data", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon_data")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon_data", "couponid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon_data")." ADD `couponid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon_data", "gettime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon_data")." ADD `gettime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon_data", "gettype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon_data")." ADD `gettype` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon_data", "usedtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon_data")." ADD `usedtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sale_coupon_data", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sale_coupon_data")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_saler", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_saler", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `storeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_saler", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_saler", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_saler", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_saler", "salername")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `salername` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_saler", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `username` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_saler", "pwd")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `pwd` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_saler", "salt")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `salt` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_saler", "lastvisit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `lastvisit` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_saler", "lastip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `lastip` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_saler", "isfounder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `isfounder` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_saler", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_saler", "getmessage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `getmessage` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_saler", "getnotice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `getnotice` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_saler", "roleid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler")." ADD `roleid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_saler_verify_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler_verify_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_saler_verify_log", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler_verify_log")." ADD `storeid` int(11) DEFAULT '0' COMMENT '店铺id';");
}
if(!pdo_fieldexists("ewei_shop_saler_verify_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler_verify_log")." ADD `uniacid` int(11) DEFAULT '0' COMMENT '公众号id';");
}
if(!pdo_fieldexists("ewei_shop_saler_verify_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler_verify_log")." ADD `openid` varchar(255) DEFAULT '' COMMENT '核销员openid';");
}
if(!pdo_fieldexists("ewei_shop_saler_verify_log", "saler_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler_verify_log")." ADD `saler_id` int(11) NOT NULL DEFAULT '0' COMMENT '核销员id';");
}
if(!pdo_fieldexists("ewei_shop_saler_verify_log", "order_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler_verify_log")." ADD `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id';");
}
if(!pdo_fieldexists("ewei_shop_saler_verify_log", "verify_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler_verify_log")." ADD `verify_time` int(11) NOT NULL DEFAULT '0' COMMENT '核销时间';");
}
if(!pdo_fieldexists("ewei_shop_saler_verify_log", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_saler_verify_log")." ADD `type` tinyint(2) DEFAULT '0' COMMENT '0是常规1是计时计次';");
}
if(!pdo_fieldexists("ewei_shop_seckill_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_seckill_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_seckill_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_category")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "cateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `cateid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `enabled` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "page_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `page_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `share_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `share_desc` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `share_icon` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "tag")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `tag` varchar(10) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "closesec")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `closesec` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "oldshow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `oldshow` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "times")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `times` text;");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task", "overtimes")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task")." ADD `overtimes` tinyint(2);");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `taskid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "roomid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `roomid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "timeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `timeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "goodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `goodsid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "optionid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `optionid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "total")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `total` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "maxbuy")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `maxbuy` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "totalmaxbuy")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `totalmaxbuy` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "commission1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `commission1` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "commission2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `commission2` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_goods", "commission3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_goods")." ADD `commission3` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `taskid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `enabled` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "page_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `page_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `share_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `share_desc` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `share_icon` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "oldshow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `oldshow` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "tag")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `tag` varchar(10) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_room", "diypage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_room")." ADD `diypage` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_time", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_time")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_time", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_time")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_time", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_time")." ADD `taskid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_seckill_task_time", "time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_seckill_task_time")." ADD `time` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "cpid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `cpid` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "expiration")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `expiration` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `starttime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `endtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `status` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `createtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket")." ADD `title` varchar(255) NOT NULL DEFAULT '新人礼包';");
}
if(!pdo_fieldexists("ewei_shop_sendticket_draw", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_draw")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_draw", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_draw")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_draw", "cpid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_draw")." ADD `cpid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_draw", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_draw")." ADD `openid` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_draw", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_draw")." ADD `createtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "sharetitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `sharetitle` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "shareicon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `shareicon` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "sharedesc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `sharedesc` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "expiration")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `expiration` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `starttime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `endtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "paycpid1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `paycpid1` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "paycpid2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `paycpid2` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "paycpid3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `paycpid3` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "paycpnum1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `paycpnum1` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "paycpnum2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `paycpnum2` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "paycpnum3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `paycpnum3` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "sharecpid1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `sharecpid1` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "sharecpid2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `sharecpid2` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "sharecpid3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `sharecpid3` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "sharecpnum1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `sharecpnum1` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "sharecpnum2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `sharecpnum2` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "sharecpnum3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `sharecpnum3` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `status` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `createtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "order")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `order` int(11);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "enough")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `enough` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_sendticket_share", "issync")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sendticket_share")." ADD `issync` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sign_records", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_records")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sign_records", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_records")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_records", "time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_records")." ADD `time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_records", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_records")." ADD `openid` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_records", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_records")." ADD `credit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_records", "log")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_records")." ADD `log` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_records", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_records")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_records", "day")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_records")." ADD `day` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "iscenter")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `iscenter` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "iscreditshop")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `iscreditshop` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `keyword` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `thumb` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `desc` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "isopen")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `isopen` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "signold")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `signold` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "signold_price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `signold_price` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "signold_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `signold_type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "textsign")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `textsign` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "textsignold")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `textsignold` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "textsigned")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `textsigned` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "textsignforget")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `textsignforget` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "maincolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `maincolor` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "cycle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `cycle` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "reward_default_first")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `reward_default_first` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "reward_default_day")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `reward_default_day` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "reword_order")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `reword_order` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "reword_sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `reword_sum` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "reword_special")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `reword_special` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "sign_rule")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `sign_rule` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sign_set", "share")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_set")." ADD `share` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_user", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_user")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sign_user", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_user")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_user", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_user")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_user", "order")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_user")." ADD `order` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_user", "orderday")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_user")." ADD `orderday` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_user", "sum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_user")." ADD `sum` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sign_user", "signdate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_user")." ADD `signdate` varchar(10) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sign_user", "isminiprogram")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sign_user")." ADD `isminiprogram` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sms", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `type` varchar(10) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms", "template")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `template` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms", "smstplid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `smstplid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms", "smssign")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `smssign` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `content` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sms", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "juhe")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `juhe` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "juhe_key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `juhe_key` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "dayu")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `dayu` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "dayu_key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `dayu_key` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "dayu_secret")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `dayu_secret` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_url` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_sn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_sn` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_pw")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_pw` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_sk")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_sk` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_phost")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_phost` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_pport")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_pport` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_puser")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_puser` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_ppw")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_ppw` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_out")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_out` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_outresp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_outresp` int(11) NOT NULL DEFAULT '30';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_warn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_warn` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_mobile` varchar(11) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "emay_warn_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `emay_warn_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "aliyun")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `aliyun` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "aliyun_appcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `aliyun_appcode` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "aliyun_new")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `aliyun_new` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "aliyun_new_keyid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `aliyun_new_keyid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sms_set", "aliyun_new_keysecret")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sms_set")." ADD `aliyun_new_keysecret` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "cid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `cid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `title` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `logo` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `desc` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "showgroups")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `showgroups` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "showlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `showlevels` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "postgroups")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `postgroups` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "postlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `postlevels` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "showagentlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `showagentlevels` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "postagentlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `postagentlevels` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "postcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `postcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "replycredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `replycredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "bestcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `bestcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "bestboardcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `bestboardcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "notagent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `notagent` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "notagentpost")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `notagentpost` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "topcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `topcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "topboardcredit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `topboardcredit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "noimage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `noimage` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "novoice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `novoice` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "needfollow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `needfollow` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "needpostfollow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `needpostfollow` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "share_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `share_title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "share_icon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `share_icon` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "share_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `share_desc` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `keyword` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `isrecommand` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "banner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `banner` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "needcheck")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `needcheck` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "needcheckmanager")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `needcheckmanager` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "needcheckreply")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `needcheckreply` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "needcheckreplymanager")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `needcheckreplymanager` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "showsnslevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `showsnslevels` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "postsnslevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `postsnslevels` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "showpartnerlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `showpartnerlevels` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "postpartnerlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `postpartnerlevels` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "notpartner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `notpartner` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board", "notpartnerpost")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board")." ADD `notpartnerpost` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board_follow", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board_follow")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_board_follow", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board_follow")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board_follow", "bid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board_follow")." ADD `bid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_board_follow", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board_follow")." ADD `openid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_sns_board_follow", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_board_follow")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `name` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `thumb` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `displayorder` tinyint(3) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `enabled` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "advimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `advimg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "advurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `advurl` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_category", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_category")." ADD `isrecommand` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `type` tinyint(3) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "postsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `postsid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "defendant")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `defendant` varchar(255) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "complainant")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `complainant` varchar(255) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "complaint_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `complaint_type` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "complaint_text")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `complaint_text` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `images` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "checkedtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `checkedtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "checked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `checked` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "checked_note")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `checked_note` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sns_complain", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complain")." ADD `deleted` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complaincate", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complaincate")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_complaincate", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complaincate")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sns_complaincate", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complaincate")." ADD `name` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_sns_complaincate", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complaincate")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_complaincate", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_complaincate")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_level", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_level")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_level", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_level")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_level", "levelname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_level")." ADD `levelname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_level", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_level")." ADD `credit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_level", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_level")." ADD `enabled` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_level", "post")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_level")." ADD `post` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_level", "color")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_level")." ADD `color` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_level", "bg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_level")." ADD `bg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_like", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_like")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_like", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_like")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_like", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_like")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_like", "pid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_like")." ADD `pid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_manage", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_manage")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_manage", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_manage")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_manage", "bid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_manage")." ADD `bid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_manage", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_manage")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_manage", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_manage")." ADD `enabled` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `openid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `level` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `credit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "sign")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `sign` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "isblack")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `isblack` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_member", "notupgrade")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_member")." ADD `notupgrade` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "bid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `bid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "pid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `pid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "rpid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `rpid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `openid` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "avatar")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `avatar` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `nickname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `title` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "images")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `images` text;");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "voice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `voice` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "replytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `replytime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "credit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `credit` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "views")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `views` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "islock")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `islock` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "istop")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `istop` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "isboardtop")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `isboardtop` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "isbest")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `isbest` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "isboardbest")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `isboardbest` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `deleted` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "deletedtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `deletedtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "checked")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `checked` tinyint(3);");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "checktime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `checktime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sns_post", "isadmin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sns_post")." ADD `isadmin` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_store", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "storename")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `storename` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "address")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `address` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "tel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `tel` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "lat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `lat` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "lng")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `lng` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `type` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `realname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "fetchtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `fetchtime` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `logo` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "saletime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `saletime` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `desc` text;");
}
if(!pdo_fieldexists("ewei_shop_store", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "order_printer")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `order_printer` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "order_template")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `order_template` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "ordertype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `ordertype` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "banner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `banner` text;");
}
if(!pdo_fieldexists("ewei_shop_store", "label")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `label` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_store", "tag")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `tag` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_store", "classify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `classify` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_store", "perms")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `perms` text;");
}
if(!pdo_fieldexists("ewei_shop_store", "citycode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `citycode` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "opensend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `opensend` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "province")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `province` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "city")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `city` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "area")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `area` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "provincecode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `provincecode` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "areacode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `areacode` varchar(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_store", "diypage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `diypage` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "diypage_ispage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `diypage_ispage` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_store", "diypage_list")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `diypage_list` text;");
}
if(!pdo_fieldexists("ewei_shop_store", "storegroupid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `storegroupid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_store", "cates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `cates` text;");
}
if(!pdo_fieldexists("ewei_shop_store", "pcates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `pcates` text;");
}
if(!pdo_fieldexists("ewei_shop_store", "tcates")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_store")." ADD `tcates` text;");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `uid` int(11) NOT NULL COMMENT '供应商id';");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `type` int(11) NOT NULL COMMENT '1手动2微信';");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "applysn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `applysn` varchar(255) NOT NULL COMMENT '提现单号';");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "apply_money")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `apply_money` int(11) NOT NULL COMMENT '申请金额';");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "apply_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `apply_time` int(11) NOT NULL COMMENT '申请时间';");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `status` tinyint(3) NOT NULL COMMENT '0为申请状态1为完成状态';");
}
if(!pdo_fieldexists("ewei_shop_supplier_apply", "finish_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_supplier_apply")." ADD `finish_time` int(11) NOT NULL COMMENT '完成时间';");
}
if(!pdo_fieldexists("ewei_shop_sysset", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sysset")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_sysset", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sysset")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_sysset", "sets")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sysset")." ADD `sets` longtext;");
}
if(!pdo_fieldexists("ewei_shop_sysset", "plugins")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sysset")." ADD `plugins` longtext;");
}
if(!pdo_fieldexists("ewei_shop_sysset", "sec")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_sysset")." ADD `sec` longtext;");
}
if(!pdo_fieldexists("ewei_shop_system_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_adv", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_adv")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_adv", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_adv")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_adv", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_adv")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_adv", "module")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_adv")." ADD `module` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_adv", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_adv")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_article", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_article", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_article", "author")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `author` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_article", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_article", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_system_article", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_article", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_article", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_article", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_article")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_banner", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_banner")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_banner", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_banner")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_banner", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_banner")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_banner", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_banner")." ADD `url` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_banner", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_banner")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_banner", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_banner")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_banner", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_banner")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_banner", "background")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_banner")." ADD `background` varchar(10) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_case", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_case")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_case", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_case")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_case", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_case")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_case", "qr")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_case")." ADD `qr` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_case", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_case")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_case", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_case")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_case", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_case")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_case", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_case")." ADD `description` varchar(255) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_casecategory", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_casecategory")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_casecategory", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_casecategory")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_casecategory", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_casecategory")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_casecategory", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_casecategory")." ADD `status` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_category")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_category")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_category", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_category")." ADD `status` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "author")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `author` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_company_article", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_article")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_company_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_company_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_category")." ADD `name` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_company_category", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_category")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_company_category", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_company_category")." ADD `status` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_copyright", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_system_copyright", "copyright")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright")." ADD `copyright` text;");
}
if(!pdo_fieldexists("ewei_shop_system_copyright", "bgcolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright")." ADD `bgcolor` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright", "ismanage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright")." ADD `ismanage` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright")." ADD `logo` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright_notice", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright_notice")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_copyright_notice", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright_notice")." ADD `title` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright_notice", "author")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright_notice")." ADD `author` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright_notice", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright_notice")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_system_copyright_notice", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright_notice")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright_notice", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright_notice")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_copyright_notice", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_copyright_notice")." ADD `status` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_guestbook", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_guestbook")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_guestbook", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_guestbook")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_guestbook", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_guestbook")." ADD `content` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_guestbook", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_guestbook")." ADD `nickname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_guestbook", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_guestbook")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_system_guestbook", "email")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_guestbook")." ADD `email` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_guestbook", "clientip")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_guestbook")." ADD `clientip` varchar(64) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_guestbook", "mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_guestbook")." ADD `mobile` varchar(11) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_link", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_link")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_link", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_link")." ADD `name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_link", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_link")." ADD `url` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_link", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_link")." ADD `thumb` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_link", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_link")." ADD `displayorder` int(11);");
}
if(!pdo_fieldexists("ewei_shop_system_link", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_link")." ADD `status` tinyint(3);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "logno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `logno` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `code` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "pluginid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `pluginid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "identity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `identity` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `type` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "month")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `month` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "permendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `permendtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "permlasttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `permlasttime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "isperm")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `isperm` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `createtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_log", "deleted")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_log")." ADD `deleted` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "logno")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `logno` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `code` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "username")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `username` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "pluginid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `pluginid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "month")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `month` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `createtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "paystatus")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `paystatus` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "paytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `paytime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_order", "paytype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_order")." ADD `paytype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "pluginid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `pluginid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "text")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `text` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `thumb` varchar(1000);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "state")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `state` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "rec")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `rec` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `desc` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `content` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_package", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_package")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "pluginid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `pluginid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `thumb` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "state")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `state` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `content` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "sales")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `sales` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `createtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "plugintype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `plugintype` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_plugin", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_plugin")." ADD `name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "com")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `com` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "adv")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `adv` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "plugin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `plugin` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "customer")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `customer` varchar(50) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "contact")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `contact` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "servertime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `servertime` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "weixin")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `weixin` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "appid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `appid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "mchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `mchid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "apikey")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `apikey` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "alipay")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `alipay` tinyint(3) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "account")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `account` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "partner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `partner` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_plugingrant_setting", "secret")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_plugingrant_setting")." ADD `secret` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_system_setting", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_setting")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_setting", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_setting")." ADD `uniacid` int(10);");
}
if(!pdo_fieldexists("ewei_shop_system_setting", "background")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_setting")." ADD `background` varchar(10) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_setting", "casebanner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_setting")." ADD `casebanner` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_setting", "contact")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_setting")." ADD `contact` longtext;");
}
if(!pdo_fieldexists("ewei_shop_system_site", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_site")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_system_site", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_site")." ADD `type` varchar(32) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_system_site", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_system_site")." ADD `content` text;");
}
if(!pdo_fieldexists("ewei_shop_task", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `type` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `starttime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `endtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task", "dotime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `dotime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task", "donetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `donetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task", "timelimit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `timelimit` float(11,1) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `keyword` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task", "explain")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `explain` text;");
}
if(!pdo_fieldexists("ewei_shop_task", "require_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `require_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task", "reward_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `reward_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task", "period")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `period` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task", "repeat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `repeat` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task", "maxtimes")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `maxtimes` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task", "everyhours")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `everyhours` float(11,1) NOT NULL DEFAULT '0.0';");
}
if(!pdo_fieldexists("ewei_shop_task", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task")." ADD `logo` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_adv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_adv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_adv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_adv")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_adv", "advname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_adv")." ADD `advname` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_adv", "link")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_adv")." ADD `link` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_adv", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_adv")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_adv", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_adv")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_adv", "enabled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_adv")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_default", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_default")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_default", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_default")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_default", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_default")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_task_default", "addtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_default")." ADD `addtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_default", "bgimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_default")." ADD `bgimg` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_default", "open")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_default")." ADD `open` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_extension", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_extension", "taskname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension")." ADD `taskname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_extension", "taskclass")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension")." ADD `taskclass` varchar(25) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_extension", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_extension", "classify")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension")." ADD `classify` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_extension", "classify_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension")." ADD `classify_name` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_extension", "verb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension")." ADD `verb` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_extension", "unit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension")." ADD `unit` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `taskid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `openid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "require_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `require_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "progress_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `progress_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "reward_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `reward_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "completetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `completetime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "pickuptime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `pickuptime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `endtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "dotime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `dotime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "rewarded")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `rewarded` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_extension_join", "logo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_extension_join")." ADD `logo` varchar(255) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "join_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `join_id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_join", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "join_user")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `join_user` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "task_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `task_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "task_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `task_type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "needcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `needcount` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "completecount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `completecount` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "reward_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `reward_data` text;");
}
if(!pdo_fieldexists("ewei_shop_task_join", "is_reward")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `is_reward` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "failtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `failtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_join", "addtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_join")." ADD `addtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "complete_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `complete_id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "task_user")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `task_user` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "joiner_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `joiner_id` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "join_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `join_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "task_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `task_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "task_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `task_type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "join_status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `join_status` tinyint(1) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_task_joiner", "addtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_joiner")." ADD `addtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_list", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `title` char(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "image")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `image` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `type` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `starttime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `endtime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "demand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `demand` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "requiregoods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `requiregoods` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "picktype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `picktype` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "stop_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `stop_type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "stop_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `stop_limit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "stop_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `stop_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "stop_cycle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `stop_cycle` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "repeat_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `repeat_type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "repeat_interval")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `repeat_interval` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "repeat_cycle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `repeat_cycle` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "reward")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `reward` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "followreward")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `followreward` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "goods_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `goods_limit` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "notice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `notice` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "design_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `design_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "design_bg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `design_bg` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "native_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `native_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "native_data2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `native_data2` text;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "native_data3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `native_data3` text;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "reward2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `reward2` text;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "reward3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `reward3` text;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "level2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `level2` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "level3")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `level3` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "member_group")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `member_group` text;");
}
if(!pdo_fieldexists("ewei_shop_task_list", "auto_pick")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `auto_pick` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "keyword_pick")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `keyword_pick` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "verb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `verb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "unit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `unit` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "member_level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `member_level` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "poster_version")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `poster_version` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_list", "we7_rule_keyword_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_list")." ADD `we7_rule_keyword_id` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_log", "from_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `from_openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_log", "join_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `join_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_log", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `taskid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_log", "task_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `task_type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_log", "subdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `subdata` text;");
}
if(!pdo_fieldexists("ewei_shop_task_log", "recdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `recdata` text;");
}
if(!pdo_fieldexists("ewei_shop_task_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_log")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "days")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `days` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "bg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `bg` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `keyword` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "resptype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `resptype` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "resptext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `resptext` text;");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "resptitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `resptitle` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "respthumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `respthumb` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "respdesc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `respdesc` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "respurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `respurl` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "waittext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `waittext` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "oktext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `oktext` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "scantext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `scantext` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "beagent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `beagent` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "bedown")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `bedown` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "timestart")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `timestart` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "timeend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `timeend` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "is_repeat")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `is_repeat` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "getposter")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `getposter` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `status` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "starttext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `starttext` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "endtext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `endtext` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "reward_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `reward_data` text;");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "needcount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `needcount` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "is_delete")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `is_delete` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "poster_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `poster_type` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "reward_days")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `reward_days` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "titleicon")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `titleicon` text;");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "poster_banner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `poster_banner` text;");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "is_goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `is_goods` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster", "autoposter")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster")." ADD `autoposter` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "acid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `acid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `openid` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "posterid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `posterid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `type` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "sceneid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `sceneid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "mediaid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `mediaid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "ticket")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `ticket` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `createtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "qrimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `qrimg` varchar(1000);");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "expire")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `expire` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_poster_qr", "endtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_poster_qr")." ADD `endtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_task_qr", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_qr")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_qr", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_qr")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_qr", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_qr")." ADD `openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_qr", "recordid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_qr")." ADD `recordid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_qr", "sceneid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_qr")." ADD `sceneid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_qr", "mediaid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_qr")." ADD `mediaid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_qr", "ticket")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_qr")." ADD `ticket` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_qr", "poster_version")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_qr")." ADD `poster_version` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_record", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `taskid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "tasktitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `tasktitle` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_record", "taskimage")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `taskimage` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "tasktype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `tasktype` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "task_progress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `task_progress` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "task_demand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `task_demand` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `openid` char(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `nickname` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "picktime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `picktime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "stoptime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `stoptime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "finishtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `finishtime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "reward_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `reward_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_record", "followreward_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `followreward_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_record", "design_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `design_data` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_record", "design_bg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `design_bg` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "require_goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `require_goods` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "level1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `level1` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "reward_data1")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `reward_data1` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_record", "level2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `level2` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_record", "reward_data2")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `reward_data2` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_record", "member_group")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `member_group` text;");
}
if(!pdo_fieldexists("ewei_shop_task_record", "auto_pick")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_record")." ADD `auto_pick` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "taskid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `taskid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "tasktitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `tasktitle` char(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "tasktype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `tasktype` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "taskowner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `taskowner` char(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "ownernickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `ownernickname` char(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "recordid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `recordid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "nickname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `nickname` char(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "headimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `headimg` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `openid` char(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "reward_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `reward_type` char(10) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "reward_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `reward_title` char(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "reward_data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `reward_data` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "get")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `get` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "sent")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `sent` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "gettime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `gettime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "senttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `senttime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "isjoiner")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `isjoiner` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `price` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "level")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `level` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_reward", "read")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_reward")." ADD `read` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "entrance")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `entrance` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `keyword` varchar(10) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "cover_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `cover_title` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "cover_img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `cover_img` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "cover_desc")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `cover_desc` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "msg_pick")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `msg_pick` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_set", "msg_progress")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `msg_progress` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_set", "msg_finish")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `msg_finish` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_set", "msg_follow")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `msg_follow` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_set", "isnew")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `isnew` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "bg_img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `bg_img` varchar(255) NOT NULL DEFAULT '../addons/ewei_shopv2/plugin/task/static/images/sky.png';");
}
if(!pdo_fieldexists("ewei_shop_task_set", "top_notice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_set")." ADD `top_notice` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_task_type", "type_key")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `type_key` char(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "type_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `type_name` char(10) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `description` char(30) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "verb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `verb` char(11) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "numeric")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `numeric` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "unit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `unit` char(10) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `goods` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "theme")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `theme` char(10) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_task_type", "once")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_task_type")." ADD `once` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "goods_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `goods_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "content")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `content` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "thumbs")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `thumbs` text;");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "sort")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `sort` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "credted_at")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `credted_at` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `status` tinyint(3) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_touch_loop_list", "isrecommand")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_touch_loop_list")." ADD `isrecommand` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_universalform_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_category")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_category")." ADD `name` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_universalform_category", "merch")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_category")." ADD `merch` int(11);");
}
if(!pdo_fieldexists("ewei_shop_universalform_data", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_data")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_universalform_data", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_data")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_data", "typeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_data")." ADD `typeid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_data", "cid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_data")." ADD `cid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_data", "fields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_data")." ADD `fields` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_universalform_data", "universalformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_data")." ADD `universalformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_universalform_data", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_data")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_universalform_data", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_data")." ADD `type` tinyint(2) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "typeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `typeid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "cid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `cid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "universalformfields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `universalformfields` text;");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "fields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `fields` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `openid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `type` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "universalformid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `universalformid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "universalformdata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `universalformdata` text;");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "carrier_realname")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `carrier_realname` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_universalform_temp", "carrier_mobile")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_temp")." ADD `carrier_mobile` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `title` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "adpic")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `adpic` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "adurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `adurl` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "fields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `fields` text NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "usedata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `usedata` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "alldata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `alldata` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_universalform_type", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_universalform_type")." ADD `status` tinyint(1) DEFAULT '1';");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `type` tinyint(2) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "version")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `version` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "describe")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `describe` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "version_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `version_time` int(11);");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "is_goods")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `is_goods` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "is_live")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `is_live` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_upwxapp_log", "is_recharge")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_upwxapp_log")." ADD `is_recharge` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `openid` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `orderid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "ordergoodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `ordergoodsid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `storeid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "starttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `starttime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "limitdays")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `limitdays` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "limitnum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `limitnum` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "used")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `used` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "verifycode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `verifycode` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "codeinvalidtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `codeinvalidtime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "invalid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `invalid` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "getcard")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `getcard` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "activecard")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `activecard` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "cardcode")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `cardcode` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "limittype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `limittype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_verifygoods", "limitdate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods")." ADD `limitdate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_verifygoods_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_verifygoods_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods_log")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods_log", "verifygoodsid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods_log")." ADD `verifygoodsid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods_log", "salerid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods_log")." ADD `salerid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods_log", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods_log")." ADD `storeid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods_log", "verifynum")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods_log")." ADD `verifynum` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods_log", "verifydate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods_log")." ADD `verifydate` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifygoods_log", "remarks")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifygoods_log")." ADD `remarks` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_verifyorder_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifyorder_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_verifyorder_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifyorder_log")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifyorder_log", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifyorder_log")." ADD `orderid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifyorder_log", "salerid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifyorder_log")." ADD `salerid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifyorder_log", "storeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifyorder_log")." ADD `storeid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifyorder_log", "verifytime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifyorder_log")." ADD `verifytime` int(11);");
}
if(!pdo_fieldexists("ewei_shop_verifyorder_log", "verifyinfo")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_verifyorder_log")." ADD `verifyinfo` longtext;");
}
if(!pdo_fieldexists("ewei_shop_version", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_version")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_version", "uid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_version")." ADD `uid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_version", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_version")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_version", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_version")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_version", "version")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_version")." ADD `version` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_category", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_category")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_virtual_category", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_category")." ADD `uniacid` int(11) DEFAULT '0' COMMENT '所属帐号';");
}
if(!pdo_fieldexists("ewei_shop_virtual_category", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_category")." ADD `name` varchar(50) COMMENT '分类名称';");
}
if(!pdo_fieldexists("ewei_shop_virtual_category", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_category")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "typeid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `typeid` int(11) NOT NULL DEFAULT '0' COMMENT '类型id';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "pvalue")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `pvalue` varchar(255) DEFAULT '' COMMENT '主键键值';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "fields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `fields` text NOT NULL COMMENT '字符集';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '使用者openid';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "usetime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `usetime` int(11) NOT NULL DEFAULT '0' COMMENT '使用时间';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `orderid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "ordersn")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `ordersn` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "price")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `price` decimal(10,2) DEFAULT '0.00';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `createtime` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "is_top")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `is_top` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_data", "sort_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_data")." ADD `sort_time` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `openid` varchar(40) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "orderid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `orderid` tinyint(3) unsigned NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "tag")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `tag` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "default")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `default` varchar(2000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "cusdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `cusdefault` varchar(2000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `url` varchar(128) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `datas` varchar(2000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "appurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `appurl` varchar(128) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `status` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "sendtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `sendtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_send_log", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_send_log")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "cate")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `cate` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `title` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名称';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "fields")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `fields` text NOT NULL COMMENT '字段集';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "usedata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `usedata` int(11) NOT NULL DEFAULT '0' COMMENT '已用数据';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "alldata")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `alldata` int(11) NOT NULL DEFAULT '0' COMMENT '全部数据';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "linktext")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `linktext` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "linkurl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `linkurl` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "recycled")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `recycled` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_virtual_type", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_virtual_type")." ADD `description` text;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_bind", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_bind")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_bind", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_bind")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_bind", "wxapp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_bind")." ADD `wxapp` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `type` tinyint(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `data` mediumtext;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "lasttime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `lasttime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_page", "isdefault")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_page")." ADD `isdefault` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "thumb")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `thumb` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "bgimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `bgimg` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "lastedittime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `lastedittime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_poster", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_poster")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_startadv", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_startadv")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_startadv", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_startadv")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_startadv", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_startadv")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_startadv", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_startadv")." ADD `name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxapp_startadv", "data")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_startadv")." ADD `data` text;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_startadv", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_startadv")." ADD `createtime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_startadv", "lastedittime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_startadv")." ADD `lastedittime` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_subscribe", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_subscribe")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_subscribe", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_subscribe")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_subscribe", "type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_subscribe")." ADD `type` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_subscribe", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_subscribe")." ADD `templateid` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_subscribe", "createtime")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_subscribe")." ADD `createtime` varchar(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_tmessage", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_tmessage")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_tmessage", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_tmessage")." ADD `uniacid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_tmessage", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_tmessage")." ADD `name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxapp_tmessage", "templateid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_tmessage")." ADD `templateid` varchar(50) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_tmessage", "datas")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_tmessage")." ADD `datas` text;");
}
if(!pdo_fieldexists("ewei_shop_wxapp_tmessage", "emphasis_keyword")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_tmessage")." ADD `emphasis_keyword` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxapp_tmessage", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxapp_tmessage")." ADD `status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "card_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `card_id` varchar(255) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "displayorder")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `displayorder` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "catid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `catid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "card_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `card_type` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "logo_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `logo_url` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "wxlogourl")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `wxlogourl` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "brand_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `brand_name` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "code_type")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `code_type` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `title` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "color")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `color` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "notice")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `notice` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "service_phone")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `service_phone` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "description")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `description` text;");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "datetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `datetype` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "begin_timestamp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `begin_timestamp` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "end_timestamp")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `end_timestamp` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "fixed_term")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `fixed_term` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "fixed_begin_term")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `fixed_begin_term` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "quantity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `quantity` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "total_quantity")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `total_quantity` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "use_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `use_limit` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "get_limit")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `get_limit` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "use_custom_code")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `use_custom_code` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "bind_openid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `bind_openid` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "can_share")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `can_share` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "can_give_friend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `can_give_friend` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "center_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `center_title` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "center_sub_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `center_sub_title` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "center_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `center_url` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "setcustom")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `setcustom` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "custom_url_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `custom_url_name` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "custom_url_sub_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `custom_url_sub_title` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "custom_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `custom_url` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "setpromotion")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `setpromotion` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "promotion_url_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `promotion_url_name` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "promotion_url_sub_title")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `promotion_url_sub_title` varchar(20);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "promotion_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `promotion_url` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "source")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `source` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "can_use_with_other_discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `can_use_with_other_discount` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "setabstract")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `setabstract` tinyint(1);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "abstract")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `abstract` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "abstractimg")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `abstractimg` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "icon_url_list")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `icon_url_list` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "accept_category")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `accept_category` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "reject_category")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `reject_category` varchar(50);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "least_cost")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `least_cost` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "reduce_cost")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `reduce_cost` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "discount")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `discount` decimal(10,2);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitgoodtype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitgoodtype` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitgoodcatetype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitgoodcatetype` tinyint(1) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitgoodcateids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitgoodcateids` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitgoodids")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitgoodids` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitdiscounttype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitdiscounttype` tinyint(1) unsigned DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "merchid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `merchid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "gettype")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `gettype` tinyint(3);");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "islimitlevel")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `islimitlevel` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitmemberlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitmemberlevels` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitagentlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitagentlevels` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitpartnerlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitpartnerlevels` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "limitaagentlevels")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `limitaagentlevels` varchar(500) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "settitlecolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `settitlecolor` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "titlecolor")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `titlecolor` varchar(10) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "tagtitle")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `tagtitle` varchar(20) DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxcard", "use_condition")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxcard")." ADD `use_condition` tinyint(1) DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "room_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `room_id` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `name` varchar(50) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "cover_img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `cover_img` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "live_status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `live_status` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "local_live_status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `local_live_status` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "start_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `start_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "end_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `end_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "anchor_name")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `anchor_name` varchar(20) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "anchor_img")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `anchor_img` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "goods_json")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `goods_json` text;");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "is_top")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `is_top` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "is_recommend")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `is_recommend` tinyint(1) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive", "status")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive")." ADD `status` tinyint(4) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("ewei_shop_wxlive_back", "id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive_back")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("ewei_shop_wxlive_back", "uniacid")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive_back")." ADD `uniacid` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxlive_back", "live_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive_back")." ADD `live_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_wxlive_back", "room_id")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive_back")." ADD `room_id` int(11) NOT NULL;");
}
if(!pdo_fieldexists("ewei_shop_wxlive_back", "expire_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive_back")." ADD `expire_time` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxlive_back", "create_time")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive_back")." ADD `create_time` int(11);");
}
if(!pdo_fieldexists("ewei_shop_wxlive_back", "media_url")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive_back")." ADD `media_url` varchar(255);");
}
if(!pdo_fieldexists("ewei_shop_wxlive_back", "show_times")) {
pdo_query("ALTER TABLE ".tablename("ewei_shop_wxlive_back")." ADD `show_times` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("mc_credits_record", "presentcredit")) {
pdo_query("ALTER TABLE ".tablename("mc_credits_record")." ADD `presentcredit` decimal(10,2) NOT NULL DEFAULT '0.00';");
}