Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dankal-data-view
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
仲光辉
dankal-data-view
Commits
8f4df7b9
Commit
8f4df7b9
authored
Mar 07, 2025
by
mercymodest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:- add sql
parent
016619b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
3.0.3.sql
电子日历/3.0.3.sql
+22
-22
No files found.
电子日历/3.0.3.sql
View file @
8f4df7b9
alter
table
t_ip2location_info
#
alter
table
t_ip2location_info
alter
table
t_ip2location_info
#
alter
table
t_ip2location_info
change
user_id
business_id
bigint
not
null
comment
'业务ID 用户ID/设备ID'
;
#
change
user_id
business_id
bigint
not
null
comment
'业务ID 用户ID/设备ID'
;
#
drop
index
idx_user_id
on
t_ip2location_info
;
#
drop
index
idx_user_id
on
t_ip2location_info
;
#
create
index
idx_business_id
#
create
index
idx_business_id
on
t_ip2location_info
(
business_id
);
#
on
t_ip2location_info
(
business_id
);
#
#
alter
table
t_device
#
alter
table
t_device
add
device_address_update_time
datetime
null
comment
'设备地址(country/province/city)上次更新时间'
after
city
;
#
add
device_address_update_time
datetime
null
comment
'设备地址(country/province/city)上次更新时间'
after
city
;
#
#
-- 创建复合索引用于地理位置三级筛选
#
-- 创建复合索引用于地理位置三级筛选
ALTER
TABLE
t_device
#
ALTER
TABLE
t_device
ADD
INDEX
idx_device_location
(
country
,
province
,
city
);
#
ADD
INDEX
idx_device_location
(
country
,
province
,
city
);
-- 单独按省份查询的需求
#
-- 单独按省份查询的需求
ALTER
TABLE
t_device
ADD
INDEX
idx_province
(
province
);
#
ALTER
TABLE
t_device
ADD
INDEX
idx_province
(
province
);
-- 单独按城市查询的需求
#
-- 单独按城市查询的需求
ALTER
TABLE
t_device
ADD
INDEX
idx_city
(
city
);
#
ALTER
TABLE
t_device
ADD
INDEX
idx_city
(
city
);
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment