Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
Project
Project
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
zhaowei
dlink
Commits
e3fdc912
Commit
e3fdc912
authored
Feb 24, 2022
by
wenmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alert ddl
parent
d0508e42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
0 deletions
+92
-0
dlink.sql
dlink-doc/sql/dlink.sql
+44
-0
dlink_history.sql
dlink-doc/sql/dlink_history.sql
+48
-0
No files found.
dlink-doc/sql/dlink.sql
View file @
e3fdc912
...
@@ -322,4 +322,48 @@ create table dlink_job_instance
...
@@ -322,4 +322,48 @@ create table dlink_job_instance
failed_restart_count
int
null
comment
'重启次数'
failed_restart_count
int
null
comment
'重启次数'
)
comment
'作业实例'
;
)
comment
'作业实例'
;
DROP
TABLE
IF
EXISTS
`dlink_alert_instance`
;
create
table
dlink_alert_instance
(
id
int
auto_increment
comment
'自增主键'
primary
key
,
name
varchar
(
50
)
not
null
comment
'名称'
,
type
varchar
(
50
)
null
comment
'类型'
,
params
text
null
comment
'配置'
,
enabled
tinyint
default
1
null
comment
'是否启用'
,
create_time
datetime
null
comment
'创建时间'
,
update_time
datetime
null
comment
'更新时间'
)
comment
'Alert实例'
;
DROP
TABLE
IF
EXISTS
`dlink_alert_group`
;
create
table
dlink_alert_group
(
id
int
auto_increment
comment
'自增主键'
primary
key
,
name
varchar
(
50
)
not
null
comment
'名称'
,
alert_instance_ids
text
null
comment
'Alert实例IDS'
,
note
varchar
(
255
)
null
comment
'说明'
,
enabled
tinyint
default
1
null
comment
'是否启用'
,
create_time
datetime
null
comment
'创建时间'
,
update_time
datetime
null
comment
'更新时间'
)
comment
'Alert组'
;
DROP
TABLE
IF
EXISTS
`dlink_alert_history`
;
create
table
dlink_alert_history
(
id
int
auto_increment
comment
'自增主键'
primary
key
,
alert_group_id
int
null
comment
'Alert组ID'
,
job_instance_id
int
null
comment
'作业实例ID'
,
title
varchar
(
255
)
null
comment
'标题'
,
content
text
null
comment
'正文'
,
status
int
null
comment
'状态'
,
log
text
null
comment
'日志'
,
create_time
datetime
null
comment
'创建时间'
,
update_time
datetime
null
comment
'更新时间'
)
comment
'Alert历史'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
dlink-doc/sql/dlink_history.sql
View file @
e3fdc912
...
@@ -540,4 +540,52 @@ ALTER TABLE `dlink_database`
...
@@ -540,4 +540,52 @@ ALTER TABLE `dlink_database`
-- ----------------------------
-- ----------------------------
ALTER
TABLE
`dlink_job_instance`
MODIFY
COLUMN
status
varchar
(
50
)
NULL
COMMENT
'实例状态'
;
ALTER
TABLE
`dlink_job_instance`
MODIFY
COLUMN
status
varchar
(
50
)
NULL
COMMENT
'实例状态'
;
-- ----------------------------
-- 0.6.0-SNAPSHOT 2022-02-24
-- ----------------------------
DROP
TABLE
IF
EXISTS
`dlink_alert_instance`
;
create
table
dlink_alert_instance
(
id
int
auto_increment
comment
'自增主键'
primary
key
,
name
varchar
(
50
)
not
null
comment
'名称'
,
type
varchar
(
50
)
null
comment
'类型'
,
params
text
null
comment
'配置'
,
enabled
tinyint
default
1
null
comment
'是否启用'
,
create_time
datetime
null
comment
'创建时间'
,
update_time
datetime
null
comment
'更新时间'
)
comment
'Alert实例'
;
DROP
TABLE
IF
EXISTS
`dlink_alert_group`
;
create
table
dlink_alert_group
(
id
int
auto_increment
comment
'自增主键'
primary
key
,
name
varchar
(
50
)
not
null
comment
'名称'
,
alert_instance_ids
text
null
comment
'Alert实例IDS'
,
note
varchar
(
255
)
null
comment
'说明'
,
enabled
tinyint
default
1
null
comment
'是否启用'
,
create_time
datetime
null
comment
'创建时间'
,
update_time
datetime
null
comment
'更新时间'
)
comment
'Alert组'
;
DROP
TABLE
IF
EXISTS
`dlink_alert_history`
;
create
table
dlink_alert_history
(
id
int
auto_increment
comment
'自增主键'
primary
key
,
alert_group_id
int
null
comment
'Alert组ID'
,
job_instance_id
int
null
comment
'作业实例ID'
,
title
varchar
(
255
)
null
comment
'标题'
,
content
text
null
comment
'正文'
,
status
int
null
comment
'状态'
,
log
text
null
comment
'日志'
,
create_time
datetime
null
comment
'创建时间'
,
update_time
datetime
null
comment
'更新时间'
)
comment
'Alert历史'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
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