-- 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/>.
-- Tables must be sorted to match referential integrity rules
TABLE|role|roleid|ZBX_DATA
FIELD |roleid |t_id | |NOT NULL |0
FIELD |name |t_varchar(255) |'' |NOT NULL |0
FIELD |type |t_integer |'0' |NOT NULL |0
FIELD |readonly |t_integer |'0' |NOT NULL |0
TABLE|ugset|ugsetid|ZBX_DATA
FIELD |ugsetid |t_id | |NOT NULL |0
FIELD |hash |t_varchar(64) |'' |NOT NULL |0
TABLE|users|userid|ZBX_DATA
FIELD |userid |t_id | |NOT NULL |0
FIELD |username |t_varchar(100) |'' |NOT NULL |0
FIELD |name |t_varchar(100) |'' |NOT NULL |0
FIELD |surname |t_varchar(100) |'' |NOT NULL |0
FIELD |passwd |t_varchar(60) |'' |NOT NULL |0
FIELD |url |t_varchar(2048)|'' |NOT NULL |0
FIELD |autologin |t_integer |'0' |NOT NULL |0
FIELD |autologout |t_varchar(32) |'15m' |NOT NULL |0
FIELD |lang |t_varchar(7) |'default'|NOT NULL |ZBX_NODATA
FIELD |refresh |t_varchar(32) |'30s' |NOT NULL |0
FIELD |theme |t_varchar(128) |'default'|NOT NULL |ZBX_NODATA
FIELD |attempt_failed |t_integer |0 |NOT NULL |ZBX_NODATA
FIELD |attempt_ip |t_varchar(39) |'' |NOT NULL |ZBX_NODATA
FIELD |attempt_clock |t_integer |0 |NOT NULL |ZBX_NODATA
FIELD |rows_per_page |t_integer |50 |NOT NULL |0
FIELD |timezone |t_varchar(50) |'default'|NOT NULL |ZBX_NODATA
FIELD |roleid |t_id |NULL |NULL |0 |1|role
FIELD |userdirectoryid |t_id |NULL |NULL |ZBX_NODATA |2|userdirectory |userdirectoryid |RESTRICT
FIELD |ts_provisioned |t_time |'0' |NOT NULL |ZBX_NODATA
INDEX |2 |userdirectoryid
TABLE|maintenances|maintenanceid|ZBX_DATA
FIELD |maintenanceid |t_id | |NOT NULL |0
FIELD |name |t_varchar(128) |'' |NOT NULL |0
FIELD |maintenance_type|t_integer |'0' |NOT NULL |0
FIELD |description |t_shorttext |'' |NOT NULL |0
FIELD |active_since |t_integer |'0' |NOT NULL |0
FIELD |active_till |t_integer |'0' |NOT NULL |0
FIELD |tags_evaltype |t_integer |'0' |NOT NULL |0
INDEX |1 |active_since,active_till
TABLE|hgset|hgsetid|ZBX_TEMPLATE
FIELD |hgsetid |t_id | |NOT NULL |0
FIELD |hash |t_varchar(64) |'' |NOT NULL |0
TABLE|hosts|hostid|ZBX_TEMPLATE
FIELD |hostid |t_id | |NOT NULL |0
FIELD |proxyid |t_id | |NULL |0 |1|proxy |proxyid |RESTRICT
FIELD |host |t_varchar(128) |'' |NOT NULL |ZBX_PROXY
FIELD |status |t_integer |'0' |NOT NULL |ZBX_PROXY
FIELD |ipmi_authtype |t_integer |'-1' |NOT NULL |ZBX_PROXY
FIELD |ipmi_privilege |t_integer |'2' |NOT NULL |ZBX_PROXY
FIELD |ipmi_username |t_varchar(16) |'' |NOT NULL |ZBX_PROXY
FIELD |ipmi_password |t_varchar(20) |'' |NOT NULL |ZBX_PROXY
FIELD |maintenanceid |t_id | |NULL |ZBX_NODATA |2|maintenances | |RESTRICT
FIELD |maintenance_status|t_integer |'0' |NOT NULL |ZBX_NODATA
FIELD |maintenance_type|t_integer |'0' |NOT NULL |ZBX_NODATA
FIELD |maintenance_from|t_integer |'0' |NOT NULL |ZBX_NODATA
FIELD |name |t_varchar(128) |'' |NOT NULL |ZBX_PROXY
FIELD |flags |t_integer |'0' |NOT NULL |0
FIELD |templateid |t_id | |NULL |0 |3|hosts |hostid |RESTRICT
FIELD |description |t_shorttext |'' |NOT NULL |0
FIELD |tls_connect |t_integer |'1' |NOT NULL |ZBX_PROXY
FIELD |tls_accept |t_integer |'1' |NOT NULL |ZBX_PROXY
FIELD |tls_issuer |t_varchar(1024)|'' |NOT NULL |ZBX_PROXY