static int DBpatch_3010000(void)
return DBdrop_index("history_log", "history_log_2");
static int DBpatch_3010001(void)
return DBdrop_field("history_log", "id");
static int DBpatch_3010002(void)
return DBdrop_index("history_text", "history_text_2");
static int DBpatch_3010003(void)
return DBdrop_field("history_text", "id");
static int DBpatch_3010004(void)
const zbx_db_field_t field = {"recovery_mode", "0", NULL, NULL, 0, ZBX_TYPE_INT, ZBX_NOTNULL, 0};
return DBadd_field("triggers", &field);
static int DBpatch_3010005(void)
const zbx_db_field_t field = {"recovery_expression", "", NULL, NULL, 2048, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0};
return DBadd_field("triggers", &field);
static int DBpatch_3010006(void)
const zbx_db_table_t table =
{"trigger_tag", "triggertagid", 0,
{"triggertagid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0},
{"triggerid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0},
{"tag", "", NULL, NULL, 255, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0},
{"value", "", NULL, NULL, 255, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0},
return DBcreate_table(&table);
static int DBpatch_3010007(void)
return DBcreate_index("trigger_tag", "trigger_tag_1", "triggerid", 0);
static int DBpatch_3010008(void)
const zbx_db_field_t field = {"triggerid", NULL, "triggers", "triggerid", 0, 0, 0, ZBX_FK_CASCADE_DELETE};
return DBadd_foreign_key("trigger_tag", 1, &field);