-- 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