Source
xxxxxxxxxx
/*
** 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/>.
**/
/*
* 3.4 maintenance database patches
*/
static int DBpatch_3040000(void)
{
return SUCCEED;
}
static int DBpatch_3040001(void)
{
return delete_problems_with_nonexistent_object();
}
static int DBpatch_3040002(void)
{
return DBdrop_foreign_key("sessions", 1);
}
static int DBpatch_3040003(void)
{
return DBdrop_index("sessions", "sessions_1");
}
static int DBpatch_3040004(void)
{
return DBcreate_index("sessions", "sessions_1", "userid,status,lastaccess", 0);
}
static int DBpatch_3040005(void)
{
const zbx_db_field_t field = {"userid", NULL, "users", "userid", 0, 0, 0, ZBX_FK_CASCADE_DELETE};
return DBadd_foreign_key("sessions", 1, &field);
}
static int DBpatch_3040006(void)
{
return create_problem_3_index();
}
static int DBpatch_3040007(void)