-- ----------------------------
-- Table structure for alarm
-- ----------------------------
DROP TABLE IF EXISTS "alarm";
CREATE TABLE "alarm" (
  "id" integer NOT NULL,
  "ne_type" text(32) NOT NULL,
  "ne_id" text(64) NOT NULL,
  "ne_name" text(32),
  "province" text(32),
  "pv_flag" text(10),
  "alarm_seq" integer(11),
  "alarm_id" text(32) NOT NULL,
  "alarm_title" text(255),
  "alarm_code" integer(11),
  "event_time" integer(20),
  "alarm_type" text(64),
  "orig_severity" text(64),
  "perceived_severity" text(64),
  "object_uid" text(64),
  "object_name" text(64),
  "object_type" text(20),
  "location_info" text(2048),
  "alarm_status" text(64),
  "specific_problem" text(255),
  "specific_problem_id" text(100),
  "add_info" text(2048),
  "ack_state" text(64),
  "ack_time" integer(20),
  "ack_user" text(64),
  "clear_type" text(64),
  "clear_time" integer(20),
  "clear_user" text(64),
  "timestamp" integer(20),
  PRIMARY KEY ("id")
);

-- ----------------------------
-- Indexes structure for table alarm
-- ----------------------------
CREATE INDEX "idx_status_severity_time"
ON "alarm" (
  "alarm_status" ASC,
  "orig_severity" ASC,
  "event_time" ASC
);
CREATE UNIQUE INDEX "uk_uni_ne_aid"
ON "alarm" (
  "ne_type" ASC,
  "ne_id" ASC,
  "alarm_id" ASC
);

-- ----------------------------
-- Records of alarm
-- ----------------------------
