Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-opsdoc
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 60974e06
authored
Apr 29, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
格式化SQL脚本
1 parent
c74d1744
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
1.6.0_四月/1.6.0数据库SQL脚本release.sql
1.6.0_四月/1.6.0数据库SQL脚本release.sql
View file @
60974e0
...
@@ -101,6 +101,8 @@ ALTER TABLE `t_device_journey_overview`
...
@@ -101,6 +101,8 @@ ALTER TABLE `t_device_journey_overview`
ALTER
TABLE
`t_device_journey_overview`
ALTER
TABLE
`t_device_journey_overview`
ADD
INDEX
idx_vd_id
(
`vd_id`
);
ADD
INDEX
idx_vd_id
(
`vd_id`
);
INSERT
INTO
t_dict_data
(
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
is_default
,
enable_status
,
remark
,
del_flag
,
created_by
,
created_date
)
INSERT
INTO
t_dict_data
(
dict_sort
,
dict_label
,
dict_value
,
dict_type
,
is_default
,
enable_status
,
remark
,
del_flag
,
created_by
,
created_date
)
VALUES
(
1
,
'batchLinkFenceSns'
,
'https://wx.glsx.com.cn/upload/salesexcel/批量导入关联设备模板.xlsx'
,
'excelTemplate'
,
'N'
,
1
,
'批量导入关联设备excel模板'
,
0
,
1
,
sysdate
());
VALUES
(
1
,
'batchLinkFenceSns'
,
'https://wx.glsx.com.cn/upload/salesexcel/批量导入关联设备模板.xlsx'
,
'excelTemplate'
,
'N'
,
1
,
'批量导入关联设备excel模板'
,
0
,
1
,
sysdate
());
...
@@ -110,7 +112,18 @@ alter table t_electric_fence modify fence_name varchar(256) null comment '栅栏
...
@@ -110,7 +112,18 @@ alter table t_electric_fence modify fence_name varchar(256) null comment '栅栏
alter
table
t_vehicle
modify
engine
varchar
(
52
)
null
comment
'发动机'
;
alter
table
t_vehicle
modify
engine
varchar
(
52
)
null
comment
'发动机'
;
alter
table
t_workorder_vehicle
modify
engine_no
varchar
(
52
)
null
comment
'发动机号'
;
alter
table
t_workorder_vehicle
modify
engine_no
varchar
(
52
)
null
comment
'发动机号'
;
-- 短信模板
alter
table
t_electric_fence_sns
add
vd_id
int
(
11
)
null
comment
'车辆设备绑定关系'
after
sn
;
alter
table
t_electric_fence_sns_copy
add
vd_id
int
(
11
)
null
comment
'车辆设备绑定关系'
after
sn
;
-- #基础数据创建帐号
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
user_account
VARCHAR
(
50
)
DEFAULT
NULL
COMMENT
'用户名'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
user_id
INT
(
11
)
DEFAULT
NULL
COMMENT
'用户ID'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
department_id
INT
(
11
)
DEFAULT
NULL
COMMENT
'组织ID'
;
-- 短信模板(上线时执行)
alter
table
t_message_template
change
type
send_type
varchar
(
255
)
null
comment
'消息类型:短信SMS、邮件MAIL、公众号WXMP、小程序WXMA'
;
alter
table
t_message_template
change
type
send_type
varchar
(
255
)
null
comment
'消息类型:短信SMS、邮件MAIL、公众号WXMP、小程序WXMA'
;
alter
table
t_message_log
change
type
send_type
varchar
(
255
)
null
comment
'消息类型:短信SMS、邮件MAIL、公众号WXMP、小程序WXMA'
;
alter
table
t_message_log
change
type
send_type
varchar
(
255
)
null
comment
'消息类型:短信SMS、邮件MAIL、公众号WXMP、小程序WXMA'
;
alter
table
t_message_template
add
type
int
default
1
null
comment
'消息类型:根据send_type具体来看 短信类型:1:通知短信;2验证码短信'
after
send_type
;
alter
table
t_message_template
add
type
int
default
1
null
comment
'消息类型:根据send_type具体来看 短信类型:1:通知短信;2验证码短信'
after
send_type
;
...
@@ -127,15 +140,7 @@ update t_message_template set content = '【广联赛讯】尊敬的{0}先生/
...
@@ -127,15 +140,7 @@ update t_message_template set content = '【广联赛讯】尊敬的{0}先生/
update
t_message_template
set
content
=
'【广联赛讯】尊敬的{0}先生/女士,{1}车辆于{2}发生进出{3}围栏报警,请您留意具体车辆。'
where
template
=
'SMS_TEMPLATE_ENTER_LEAVE_FENCE'
;
update
t_message_template
set
content
=
'【广联赛讯】尊敬的{0}先生/女士,{1}车辆于{2}发生进出{3}围栏报警,请您留意具体车辆。'
where
template
=
'SMS_TEMPLATE_ENTER_LEAVE_FENCE'
;
-- #基础数据创建帐号
-- 更新围栏设备vdid (上线完以后执行)
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
user_account
VARCHAR
(
50
)
DEFAULT
NULL
COMMENT
'用户名'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
user_id
INT
(
11
)
DEFAULT
NULL
COMMENT
'用户ID'
;
ALTER
TABLE
`t_zhongli_department`
ADD
COLUMN
department_id
INT
(
11
)
DEFAULT
NULL
COMMENT
'组织ID'
;
alter
table
t_electric_fence_sns
add
vd_id
int
null
comment
'车辆设备绑定关系'
after
sn
;
alter
table
t_electric_fence_sns_copy
add
vd_id
int
null
comment
'车辆设备绑定关系'
after
sn
;
-- 更新围栏设备vdid
update
t_electric_fence_sns_copy
tefs
,
t_vehicle_device
tvd
,
t_vehicle
tv
update
t_electric_fence_sns_copy
tefs
,
t_vehicle_device
tvd
,
t_vehicle
tv
set
tefs
.
vd_id
=
tvd
.
id
set
tefs
.
vd_id
=
tvd
.
id
where
tvd
.
sn
=
tefs
.
sn
where
tvd
.
sn
=
tefs
.
sn
...
@@ -145,6 +150,8 @@ update t_electric_fence_sns tefs ,t_vehicle_device tvd,t_vehicle tv
...
@@ -145,6 +150,8 @@ update t_electric_fence_sns tefs ,t_vehicle_device tvd,t_vehicle tv
set
tefs
.
vd_id
=
tvd
.
id
set
tefs
.
vd_id
=
tvd
.
id
where
tvd
.
sn
=
tefs
.
sn
where
tvd
.
sn
=
tefs
.
sn
and
tv
.
id
=
tvd
.
vehicle_id
;
and
tv
.
id
=
tvd
.
vehicle_id
;
-- 数据导入操作完成后才能执行
-- 数据导入操作完成后才能执行
ALTER
TABLE
`t_device_journey`
ADD
INDEX
idx_begin_time
(
`begin_time`
);
ALTER
TABLE
`t_device_journey`
ADD
INDEX
idx_begin_time
(
`begin_time`
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment