mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
v2.1.17-20240730
This commit is contained in:
16
system/MySQL/20240720.php
Normal file
16
system/MySQL/20240720.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php if(!defined('DIR')){header('HTTP/1.1 404 Not Found');header("status: 404 Not Found");exit;}
|
||||
$sql ='
|
||||
CREATE INDEX category_idx_1
|
||||
ON user_categorys (fid, uid, status, property, pid, weight);
|
||||
|
||||
CREATE INDEX link_idx_1
|
||||
ON user_links (uid, fid, status, property, pid, add_time, click);
|
||||
';
|
||||
//创建索引用于优化效率
|
||||
if(exe_sql($sql)){
|
||||
insert_db('updatadb_logs',['file_name'=>$file_name,'update_time'=>time(),'status'=>'TRUE','extra'=>'']);
|
||||
}else{
|
||||
msg(-1,'数据库更新失败');
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALU
|
||||
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20230723.php', '1690119053', 'TRUE', '');
|
||||
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20231218.php', '1702828800', 'TRUE', '');
|
||||
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20240328.php', '1711296000', 'TRUE', '');
|
||||
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20240720.php', '1721404800', 'TRUE', '');
|
||||
|
||||
-- 创建用户表
|
||||
DROP TABLE IF EXISTS `global_user`;
|
||||
@@ -102,7 +103,7 @@ CREATE TABLE IF NOT EXISTS `user_categorys` (
|
||||
|
||||
INSERT INTO `user_categorys` (`id`, `cid`, `fid`, `uid`, `pid`, `status`, `property`, `name`, `add_time`, `up_time`, `weight`, `description`, `font_icon`, `icon`, `extend`) VALUES
|
||||
(1, 1, 0, 0, 0, 1, 0, '默认分类', 1672502400, 1672502400, 0, 'TwoNav默认分类', 'fa fa-book', '', '');
|
||||
|
||||
CREATE INDEX category_idx_1 ON user_categorys (fid, uid, status, property, pid, weight);
|
||||
|
||||
-- 用户链接表
|
||||
DROP TABLE IF EXISTS `user_links`;
|
||||
@@ -133,7 +134,7 @@ INSERT INTO `user_links` (`id`, `lid`, `uid`, `fid`, `pid`, `status`, `property`
|
||||
(1, 1, 0, 1, 0, 1, 0, 'TwoNav 源码', 'https://gitee.com/tznb/TwoNav', '', 0, '项目开源地址', '', 0, 1672502400, 1672502400, ''),
|
||||
(2, 2, 0, 1, 0, 1, 0, '使用说明', 'https://gitee.com/tznb/TwoNav/wikis', '', 0, '使用说明', '', 0, 1672502400, 1672502400, '');
|
||||
|
||||
|
||||
CREATE INDEX link_idx_1 ON user_links (uid, fid, status, property, pid, add_time, click);
|
||||
|
||||
-- 登录信息表
|
||||
DROP TABLE IF EXISTS `user_login_info`;
|
||||
|
||||
Reference in New Issue
Block a user