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, serial_no varchar(64), channel_no varchar(64), platform varchar(32), constraint camera_status_alarm_pk primary key (id), constraint camera_status_alarm_camera_status_id_fk foreign key (status_id) references camera_status ); 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 '更新时间'; comment on column camera_status_alarm.serial_no is '序列号'; comment on column camera_status_alarm.channel_no is '通道号'; create unique index if not exists camera_status_alarm_id_uindex on camera_status_alarm (id);