Source
const ZBX_FIELD field = {"lld_override_operationid", NULL, "lld_override_operation", "lld_override_operationid",
/*
** 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.
**/
/*
* 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_FIELD 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_FIELD field = {"hostid", NULL, "hosts", "hostid", 0, 0, 0, ZBX_FK_CASCADE_DELETE};
return DBadd_foreign_key("items", 1, &field);