CODE
1 year ago
2 changed files with 39 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||
|
create table if not exists project_group |
||||
|
( |
||||
|
id serial not null |
||||
|
constraint project_group_pk |
||||
|
primary key, |
||||
|
name varchar(256), |
||||
|
poms_project_ids integer[] not null, |
||||
|
poms_user_id integer not null |
||||
|
constraint project_group_user_id_fk |
||||
|
references "user" |
||||
|
); |
||||
|
|
||||
|
comment on column project_group.poms_project_ids is '运维项目id'; |
||||
|
|
||||
|
create unique index if not exists project_group_id_uindex |
||||
|
on project_group (id); |
||||
|
|
@ -0,0 +1,22 @@ |
|||||
|
create table if not exists t_structure_off |
||||
|
( |
||||
|
id serial not null |
||||
|
constraint t_structure_off_pk |
||||
|
primary key, |
||||
|
structure integer not null, |
||||
|
offline integer not null, |
||||
|
offtime varchar not null, |
||||
|
state integer not null |
||||
|
); |
||||
|
|
||||
|
comment on column t_structure_off.structure is '结构物id'; |
||||
|
|
||||
|
comment on column t_structure_off.offline is '离线时长(分钟)'; |
||||
|
|
||||
|
comment on column t_structure_off.offtime is '最后数据时间'; |
||||
|
|
||||
|
comment on column t_structure_off.state is '数据状态( 0:有效,1:无效)'; |
||||
|
|
||||
|
create unique index if not exists t_structure_off_id_uindex |
||||
|
on t_structure_off (id); |
||||
|
|
Loading…
Reference in new issue