Source
if (ZBX_DB_OK > zbx_db_execute("update profiles set value_int=1 where idx='web.layout.mode' and value_int=2"))
/*
** 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/>.
**/
/*
* 5.0 development database patches
*/
static int DBpatch_4050001(void)
{
return DBdrop_foreign_key("items", 1);
}
static int DBpatch_4050002(void)
{
return DBdrop_index("items", "items_1");
}
static int DBpatch_4050003(void)
{
const zbx_db_field_t field = {"key_", "", NULL, NULL, 2048, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0};
return DBmodify_field_type("items", &field, NULL);
}
static int DBpatch_4050004(void)
{
return DBcreate_index("items", "items_1", "hostid,key_(1021)", 0);
return DBcreate_index("items", "items_1", "hostid,key_", 0);
}
static int DBpatch_4050005(void)
{
const zbx_db_field_t field = {"hostid", NULL, "hosts", "hostid", 0, 0, 0, ZBX_FK_CASCADE_DELETE};
return DBadd_foreign_key("items", 1, &field);
}
static int DBpatch_4050006(void)