create table alarm_data_continuity ( id serial not null, file text not null, type int not null, create_time timestamp not null ); comment on column alarm_data_continuity.type is '数据连续性的类型编号'; create unique index alarm_data_continuity_id_uindex on alarm_data_continuity (id); alter table alarm_data_continuity add constraint alarm_data_continuity_pk primary key (id); create table alarm_data_continuity_type ( id serial not null, name varchar not null, type_number int not null ); comment on column alarm_data_continuity_type.type_number is '类型编号'; create unique index alarm_data_continuity_type_id_uindex on alarm_data_continuity_type (id); create unique index alarm_data_continuity_type_type_number_uindex on alarm_data_continuity_type (type_number); alter table alarm_data_continuity_type add constraint alarm_data_continuity_type_pk primary key (id);