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
b2dbdd66
Commit
b2dbdd66
authored
Nov 13, 2024
by
mercymodest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:- add sql
parent
96e9bf44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
2024-11-07-update.sql
电子日历/2024-11-07-update.sql
+35
-1
No files found.
电子日历/2024-11-07-update.sql
View file @
b2dbdd66
alter
table
t_events
alter
table
t_events
...
@@ -7,3 +7,36 @@ alter table t_events
...
@@ -7,3 +7,36 @@ alter table t_events
create
index
t_event_category_relations_event_id_index
create
index
t_event_category_relations_event_id_index
on
t_event_category_relations
(
event_id
);
on
t_event_category_relations
(
event_id
);
-- 创建杂物完成记录表
CREATE
TABLE
t_misc_event_records
(
-- 主键 ID,使用自增
misc_event_record_id
BIGINT
NOT
NULL
,
-- 设备 ID
device_id
BIGINT
NOT
NULL
COMMENT
'设备ID'
,
-- 事件 ID
origin_event_id
BIGINT
NOT
NULL
COMMENT
'事件ID'
,
start_datetime
datetime
null
comment
'事项开始时间(UTC+0)'
,
start_date
date
null
comment
'开始日期'
,
start_time
time
null
comment
'开始时间'
,
end_datetime
datetime
null
comment
'事项结束时间(UTC+0)'
,
end_date
date
null
comment
'结束日期'
,
end_time
time
null
comment
'结束时间'
,
completed_time
DATETIME
NOT
NULL
COMMENT
'杂物完成时间'
,
create_time
datetime
default
CURRENT_TIMESTAMP
not
null
comment
'创建时间,插入时自动更新'
,
update_time
datetime
default
CURRENT_TIMESTAMP
not
null
on
update
CURRENT_TIMESTAMP
comment
'更新时间,插入和更新时自动更新'
,
-- 主键约束
PRIMARY
KEY
(
misc_event_record_id
),
-- 索引
INDEX
idx_device_id
(
device_id
),
INDEX
idx_origin_event_id
(
origin_event_id
),
INDEX
idc_start_datetime
(
start_datetime
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'杂物完成记录表'
;
\ 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