Source
if (ZBX_DB_OK > zbx_db_execute("delete from profiles where idx in ('web.latest.php.sort', 'web.httpmon.php.sort')"))
/*
** Copyright (C) 2001-2024 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/*
* 2.4 development database patches
*/
static int DBpatch_2030000(void)
{
return SUCCEED;
}
static int DBpatch_2030001(void)
{
const zbx_db_field_t field = {"every", "1", NULL, NULL, 0, ZBX_TYPE_INT, ZBX_NOTNULL, 0};
return DBset_default("timeperiods", &field);
}
static int DBpatch_2030002(void)
{
const zbx_db_table_t table =
{"trigger_discovery_tmp", "", 0,
{
{"triggerid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0},
{"parent_triggerid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0},
{0}
},
NULL
};
return DBcreate_table(&table);
}
static int DBpatch_2030003(void)
{
if (ZBX_DB_OK <= zbx_db_execute(
"insert into trigger_discovery_tmp (select triggerid,parent_triggerid from trigger_discovery)"))
{
return SUCCEED;
}