create table if not exists camera_status_alarm ( id serial not null, status_id integer not null, description varchar(1024), confirm varchar(1024), confirm_time timestamp with time zone, create_time timestamp with time zone, update_time timestamp with time zone, camera_id integer, constraint camera_status_alarm_pk primary key (id), constraint camera_status_alarm_camera_status_id_fk foreign key (status_id) references camera_status, constraint camera_status_alarm_camera_id_fk foreign key (camera_id) references camera ); comment on column camera_status_alarm.description is '描述'; comment on column camera_status_alarm.confirm is '确认信息'; comment on column camera_status_alarm.create_time is '生成时间'; comment on column camera_status_alarm.update_time is '更新时间'; create unique index if not exists camera_status_alarm_id_uindex on camera_status_alarm (id);