Source
/* skip patches that altered table instead of creating new one and copying contents as this fails on newer MariaDB */
/*
** Copyright (C) 2001-2025 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/>.
**/
/*
* 4.4 development database patches
*/
static int DBpatch_4030000(void)
{
const zbx_db_field_t field = {"host", "", NULL, NULL, 128, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0};
return DBmodify_field_type("autoreg_host", &field, NULL);
}
static int DBpatch_4030001(void)
{
const zbx_db_field_t field = {"host", "", NULL, NULL, 128, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0};
return DBmodify_field_type("proxy_autoreg_host", &field, NULL);
}
static int DBpatch_4030002(void)
{
const zbx_db_field_t field = {"host", "", NULL, NULL, 128, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0};
return DBmodify_field_type("host_discovery", &field, NULL);
}
static int DBpatch_4030003(void)
{
const zbx_db_table_t table =
{"item_rtdata", "itemid", 0,
{
{"itemid", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0},
{"lastlogsize", "0", NULL, NULL, 0, ZBX_TYPE_UINT, ZBX_NOTNULL, 0},
{"state", "0", NULL, NULL, 0, ZBX_TYPE_INT, ZBX_NOTNULL, 0},
{"mtime", "0", NULL, NULL, 0, ZBX_TYPE_INT, ZBX_NOTNULL, 0},
{"error", "", NULL, NULL, 2048, ZBX_TYPE_CHAR, ZBX_NOTNULL, 0},
{0}
},
NULL
};
return DBcreate_table(&table);
}