去评论
dz插件网

Discuz!X3.5优化 短信网关接口以及安全手机验证功能需要升级的数据库语句

admin
2022/01/01 16:12:33
Discuz!X3.5优化 短信网关接口以及安全手机验证功能需要升级的数据库语句:

  1. ALTER TABLE `pre_common_smslog` ADD `smstype` int(10) NOT NULL DEFAULT '0' AFTER `uid`;
  2. ALTER TABLE `pre_common_smslog` ADD `svctype` int(10) NOT NULL DEFAULT '0' AFTER `smstype`;
  3. ALTER TABLE `pre_common_smslog` ADD `smsgw` int(10) NOT NULL DEFAULT '0' AFTER `svctype`;
  4. ALTER TABLE `pre_common_smslog` ADD `status` int(10) NOT NULL DEFAULT '0' AFTER `smsgw`;
  5. ALTER TABLE `pre_common_smslog` ADD `verify` int(10) NOT NULL DEFAULT '0' AFTER `status`;
  6. ALTER TABLE `pre_common_smslog` ADD `secmobicc` varchar(3) NOT NULL DEFAULT '' AFTER `verify`;
  7. ALTER TABLE `pre_common_smslog` ADD `secmobile` varchar(12) NOT NULL DEFAULT '' AFTER `uid`;
  8. ALTER TABLE `pre_common_smslog` ADD `ip` varchar(45) NOT NULL DEFAULT '' AFTER `secmobile`;
  9. ALTER TABLE `pre_common_smslog` ADD `port` varchar(45) NOT NULL DEFAULT '' AFTER `ip`;
  10. ALTER TABLE `pre_common_smslog` ADD `content` varchar(45) NOT NULL DEFAULT '' AFTER `port`;
  11. ALTER TABLE `pre_common_smslog` ADD `dateline` varchar(45) NOT NULL DEFAULT '' AFTER `content`;


  12. ALTER TABLE `pre_common_smslog` DROP INDEX `lastsent`, ADD KEY `dateline` (`secmobicc`, `secmobile`, `dateline`), ADD KEY `uid` (`uid`);


  13. DROP TABLE IF EXISTS `pre_common_smslog_archive`;
  14. CREATE TABLE `pre_common_smslog_archive` (
  15.   `smslogid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  16.   `uid` mediumint(8) unsigned NOT NULL,
  17.   `smstype` int(10) NOT NULL DEFAULT '0',
  18.   `svctype` int(10) NOT NULL DEFAULT '0',
  19.   `smsgw` int(10) NOT NULL DEFAULT '0',
  20.   `status` int(10) NOT NULL DEFAULT '0',
  21.   `verify` int(10) NOT NULL DEFAULT '0',
  22.   `secmobicc` varchar(3) NOT NULL DEFAULT '',
  23.   `secmobile` varchar(12) NOT NULL DEFAULT '',
  24.   `ip` varchar(45) NOT NULL DEFAULT '',
  25.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  26.   `content` text NOT NULL,
  27.   `dateline` int(10) unsigned NOT NULL DEFAULT '0',
  28.   PRIMARY KEY (`smslogid`)
  29. ) ENGINE=InnoDB;


  30. ALTER TABLE `pre_common_member` ADD KEY secmobile (`secmobile`, `secmobicc`);

  31. INSERT INTO pre_common_cron VALUES ('21','1','system','每周短信日志归档','cron_smslog_daily.php','1269746639','1269792000','-1','-1','03','0');

  32. INSERT INTO pre_common_setting VALUES ('smsdefaultlength','4');