diff options
author | Dmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com> | 2022-04-28 18:00:12 +0300 |
---|---|---|
committer | Dmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com> | 2022-04-28 18:00:12 +0300 |
commit | 4b2f01bfd3cc24254cde1ea107e80ace02f9641b (patch) | |
tree | afdac08861fcbd0527b5806ddf5124bc06f1aa43 /src | |
parent | f29d2f96fd2b42ee590b1eeaeac0dca5c4dc7657 (diff) |
....I..... [ZBXNEXT-6893] added dbpatch
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/zbxdbupgrade/dbupgrade_6000.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libs/zbxdbupgrade/dbupgrade_6000.c b/src/libs/zbxdbupgrade/dbupgrade_6000.c index 02e39f9687b..37ec0ffb846 100644 --- a/src/libs/zbxdbupgrade/dbupgrade_6000.c +++ b/src/libs/zbxdbupgrade/dbupgrade_6000.c @@ -18,6 +18,7 @@ **/ #include "common.h" +#include "db.h" #include "dbupgrade.h" extern unsigned char program_type; @@ -33,6 +34,31 @@ static int DBpatch_6000000(void) return SUCCEED; } +static int DBpatch_6000001(void) +{ + if (0 == (program_type & ZBX_PROGRAM_TYPE_SERVER)) + return SUCCEED; + + if (ZBX_DB_OK > DBexecute("delete from profiles where idx='web.auditlog.filter.action' and value_int=-1")) + return FAIL; + + return SUCCEED; +} + +static int DBpatch_6000002(void) +{ + if (0 == (program_type & ZBX_PROGRAM_TYPE_SERVER)) + return SUCCEED; + + if (ZBX_DB_OK > DBexecute("update profiles set idx='web.auditlog.filter.actions' where" + " idx='web.auditlog.filter.action'")) + { + return FAIL; + } + + return SUCCEED; +} + #endif DBPATCH_START(6000) @@ -40,5 +66,7 @@ DBPATCH_START(6000) /* version, duplicates flag, mandatory flag */ DBPATCH_ADD(6000000, 0, 1) +DBPATCH_ADD(6000001, 0, 1) +DBPATCH_ADD(6000002, 0, 1) DBPATCH_END() |