Index: create/src/data.tmpl
===================================================================
--- create/src/data.tmpl	(revision 60450)
+++ create/src/data.tmpl	(working copy)
@@ -17,6 +17,11 @@
 -- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 --
 
+TABLE |users
+FIELDS|userid|alias|name  |surname      |passwd                          |url|autologin|autologout|lang |refresh|type|theme  |rows_per_page|
+ROW   |1     |Admin|Zabbix|Administrator|5fce1b3e34b520afeffb37ce08c7cd66|   |1        |0         |en_GB|30     |3   |default|50           |
+ROW   |2     |guest|      |             |d41d8cd98f00b204e9800998ecf8427e|   |0        |900       |en_GB|30     |1   |default|50           |
+
 TABLE |hosts
 FIELDS|hostid|proxy_hostid|host                           |status|ipmi_authtype|ipmi_privilege|ipmi_username|ipmi_password|name                           |flags|templateid|description|tls_connect|tls_accept|tls_issuer|tls_subject|tls_psk_identity|tls_psk|
 ROW   |10001 |NULL        |Template OS Linux              |3     |0            |2             |             |             |Template OS Linux              |0    |NULL      |           |1          |1         |          |           |                |       |
@@ -1037,11 +1042,6 @@
 ROW   |2          |3   |Jabber     |                |           |                  |         |          |jabber@company.com|zabbix|0     |25       |0            |0               |0               |0                  |           |
 ROW   |3          |2   |SMS        |                |           |                  |         |/dev/ttyS0|                  |      |0     |25       |0            |0               |0               |0                  |           |
 
-TABLE |users
-FIELDS|userid|alias|name  |surname      |passwd                          |url|autologin|autologout|lang |refresh|type|theme  |rows_per_page|
-ROW   |1     |Admin|Zabbix|Administrator|5fce1b3e34b520afeffb37ce08c7cd66|   |1        |0         |en_GB|30     |3   |default|50           |
-ROW   |2     |guest|      |             |d41d8cd98f00b204e9800998ecf8427e|   |0        |900       |en_GB|30     |1   |default|50           |
-
 TABLE |usrgrp
 FIELDS|usrgrpid|name                     |gui_access|users_status|debug_mode|
 ROW   |7       |Zabbix administrators    |0         |0           |0         |
Index: create/src/schema.tmpl
===================================================================
--- create/src/schema.tmpl	(revision 60450)
+++ create/src/schema.tmpl	(working copy)
@@ -22,6 +22,25 @@
 -- Tables must be sorted to match referential integrity rules
 --
 
+TABLE|users|userid|ZBX_DATA
+FIELD		|userid		|t_id		|	|NOT NULL	|0
+FIELD		|alias		|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_char(32)	|''	|NOT NULL	|0
+FIELD		|url		|t_varchar(255)	|''	|NOT NULL	|0
+FIELD		|autologin	|t_integer	|'0'	|NOT NULL	|0
+FIELD		|autologout	|t_integer	|'900'	|NOT NULL	|0
+FIELD		|lang		|t_varchar(5)	|'en_GB'|NOT NULL	|0
+FIELD		|refresh	|t_integer	|'30'	|NOT NULL	|0
+FIELD		|type		|t_integer	|'1'	|NOT NULL	|0
+FIELD		|theme		|t_varchar(128)	|'default'|NOT NULL	|0
+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
+UNIQUE		|1		|alias
+
 TABLE|maintenances|maintenanceid|ZBX_DATA
 FIELD		|maintenanceid	|t_id		|	|NOT NULL	|0
 FIELD		|name		|t_varchar(128)	|''	|NOT NULL	|0
@@ -363,25 +382,6 @@
 FIELD		|exec_params	|t_varchar(255)	|''	|NOT NULL	|0
 UNIQUE		|1		|description
 
-TABLE|users|userid|ZBX_DATA
-FIELD		|userid		|t_id		|	|NOT NULL	|0
-FIELD		|alias		|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_char(32)	|''	|NOT NULL	|0
-FIELD		|url		|t_varchar(255)	|''	|NOT NULL	|0
-FIELD		|autologin	|t_integer	|'0'	|NOT NULL	|0
-FIELD		|autologout	|t_integer	|'900'	|NOT NULL	|0
-FIELD		|lang		|t_varchar(5)	|'en_GB'|NOT NULL	|0
-FIELD		|refresh	|t_integer	|'30'	|NOT NULL	|0
-FIELD		|type		|t_integer	|'1'	|NOT NULL	|0
-FIELD		|theme		|t_varchar(128)	|'default'|NOT NULL	|0
-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
-UNIQUE		|1		|alias
-
 TABLE|usrgrp|usrgrpid|ZBX_DATA
 FIELD		|usrgrpid	|t_id		|	|NOT NULL	|0
 FIELD		|name		|t_varchar(64)	|''	|NOT NULL	|0
Index: src/libs/zbxdbupgrade/dbupgrade_3010.c
===================================================================
--- src/libs/zbxdbupgrade/dbupgrade_3010.c	(revision 60450)
+++ src/libs/zbxdbupgrade/dbupgrade_3010.c	(working copy)
@@ -200,7 +200,7 @@
 	return DBadd_foreign_key("event_recovery", 2, &field);
 }
 
-/* DBpatch_301002 () */
+/* DBpatch_3010021 () */
 
 #define ZBX_OPEN_EVENT_WARNING_NUM	10000000
 
