diff options
-rw-r--r-- | create/src/schema.tmpl | 16 | ||||
-rw-r--r-- | src/libs/zbxdbupgrade/dbupgrade_5050.c | 10 |
2 files changed, 12 insertions, 14 deletions
diff --git a/create/src/schema.tmpl b/create/src/schema.tmpl index 56f9fd0a1e4..ca7ffef57a3 100644 --- a/create/src/schema.tmpl +++ b/create/src/schema.tmpl @@ -1909,13 +1909,13 @@ FIELD |from |t_integer |'0' |NOT NULL |0 FIELD |to |t_integer |'0' |NOT NULL |0 INDEX |1 |slaid -TABLE|sla_downtime|sla_downtimeid|ZBX_DATA -FIELD |sla_downtimeid |t_id | |NOT NULL |0 -FIELD |slaid |t_id | |NOT NULL |0 |1|sla|slaid -FIELD |from |t_integer |'0' |NOT NULL |0 -FIELD |to |t_integer |'0' |NOT NULL |0 -FIELD |name |t_varchar(255) |'' |NOT NULL |0 -INDEX |1 |slaid +TABLE|sla_excluded_downtime|sla_excluded_downtimeid|ZBX_DATA +FIELD |sla_excluded_downtimeid|t_id | |NOT NULL |0 +FIELD |slaid |t_id | |NOT NULL |0 |1|sla|slaid +FIELD |name |t_varchar(255) |'' |NOT NULL |0 +FIELD |from |t_integer |'0' |NOT NULL |0 +FIELD |to |t_integer |'0' |NOT NULL |0 +INDEX |1 |slaid TABLE|sla_service_tag|sla_service_tagid|0 FIELD |sla_service_tagid |t_id | |NOT NULL |0 @@ -1930,5 +1930,3 @@ FIELD |dbversionid |t_id | |NOT NULL |0 FIELD |mandatory |t_integer |'0' |NOT NULL | FIELD |optional |t_integer |'0' |NOT NULL | ROW |1 |5050127 |5050127 - - diff --git a/src/libs/zbxdbupgrade/dbupgrade_5050.c b/src/libs/zbxdbupgrade/dbupgrade_5050.c index 3cd1bec6246..49299df2121 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_5050.c +++ b/src/libs/zbxdbupgrade/dbupgrade_5050.c @@ -1273,13 +1273,13 @@ static int DBpatch_5050119(void) static int DBpatch_5050120(void) { const ZBX_TABLE table = - {"sla_downtime", "sla_downtimeid", 0, + {"sla_excluded_downtime", "sla_excluded_downtimeid", 0, { - {"sla_downtimeid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0}, + {"sla_excluded_downtimeid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0}, {"slaid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0}, + {"name", "", NULL, NULL, 255, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0}, {"from", "0", NULL, NULL, 0, ZBX_TYPE_INT, ZBX_NOTNULL, 0}, {"to", "0", NULL, NULL, 0, ZBX_TYPE_INT, ZBX_NOTNULL, 0}, - {"name", "", NULL, NULL, 255, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0}, {0} }, NULL @@ -1290,14 +1290,14 @@ static int DBpatch_5050120(void) static int DBpatch_5050121(void) { - return DBcreate_index("sla_downtime", "sla_downtime_1", "slaid", 0); + return DBcreate_index("sla_excluded_downtime", "sla_excluded_downtime_1", "slaid", 0); } static int DBpatch_5050122(void) { const ZBX_FIELD field = {"slaid", NULL, "sla", "slaid", 0, ZBX_TYPE_ID, ZBX_NOTNULL, ZBX_FK_CASCADE_DELETE}; - return DBadd_foreign_key("sla_downtime", 1, &field); + return DBadd_foreign_key("sla_excluded_downtime", 1, &field); } static int DBpatch_5050123(void) |