Source
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/*
* 4.0 maintenance database patches
*/
static int DBpatch_4000000(void)
{
return SUCCEED;
}
static int DBpatch_4000001(void)
{
DB_RESULT result;
int ret;
zbx_field_len_t fields[] = {
{"def_shortdata", 0},
{"def_longdata", 0},
{"r_shortdata", 0},
{"r_longdata", 0},
{"ack_shortdata", 0},
{"ack_longdata", 0}
};
/* 0 - EVENT_SOURCE_TRIGGERS */
result = zbx_db_select("select actionid,def_shortdata,def_longdata,r_shortdata,r_longdata,ack_shortdata,"
"ack_longdata from actions where eventsource=0");
ret = db_rename_macro(result, "actions", "actionid", fields, ARRSIZE(fields), "{TRIGGER.NAME}",
"{EVENT.NAME}");
zbx_db_free_result(result);
return ret;
}
static int DBpatch_4000002(void)
{
DB_RESULT result;