1
0
Эх сурвалжийг харах

fixed schema for table OU

Dmitriev Roman 3 сар өмнө
parent
commit
bc3132a5fd

+ 4 - 4
docs/databases/mysql/en/create_db.sql

@@ -256,7 +256,7 @@ CREATE TABLE `mac_vendors` (
   `companyAddress` varchar(255) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
 
-CREATE TABLE `OU` (
+CREATE TABLE `ou` (
   `id` int(11) NOT NULL,
   `ou_name` varchar(40) DEFAULT NULL,
   `description` varchar(250) DEFAULT NULL,
@@ -579,9 +579,9 @@ ALTER TABLE `mac_vendors`
   ADD PRIMARY KEY (`id`),
   ADD KEY `oui` (`oui`);
 
-ALTER TABLE `OU`
+ALTER TABLE `ou`
   ADD PRIMARY KEY (`id`);
-ALTER TABLE `OU` ADD FULLTEXT KEY `ou_name` (`ou_name`);
+ALTER TABLE `ou` ADD FULLTEXT KEY `ou_name` (`ou_name`);
 
 ALTER TABLE `queue_list`
   ADD PRIMARY KEY (`id`),
@@ -735,7 +735,7 @@ ALTER TABLE `mac_history`
 ALTER TABLE `mac_vendors`
   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
-ALTER TABLE `OU`
+ALTER TABLE `ou`
   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
 ALTER TABLE `queue_list`

+ 14 - 14
docs/databases/mysql/en/data.sql

@@ -196,20 +196,20 @@ INSERT INTO `group_list` (`id`, `instance_id`, `group_name`, `description`) VALU
 INSERT INTO `group_list` (`id`, `instance_id`, `group_name`, `description`) VALUES(1, 1, 'Allow all', 'Allowed all');
 INSERT INTO `group_list` (`id`, `instance_id`, `group_name`, `description`) VALUES(2, 1, 'Users','For users');
 
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(0, '!Any', NULL, 0, 0, '/etc/nagios/any', 'generic-host', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(1, 'Servers', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(2, 'Administrators', NULL, 0, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(3, 'Users', NULL, 0, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(4, 'VOIP', NULL, 0, 0, 'voip', 'voip', 1, NULL, 1, 4, 5, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(5, 'IPCAM', NULL, 0, 0, 'videocam', 'ip-cam', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(6, 'Printers', NULL, 0, 0, 'printers', 'printers', 1, 'printer-service', 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(7, 'Switches', NULL, 0, 0, 'switches', 'switches', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(8, 'UPS', NULL, 0, 0, 'ups', 'ups', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(9, 'Security', NULL, 0, 0, 'security', 'security', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(10, 'Routers', NULL, 0, 0, 'routers', 'routers', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(11, 'WiFi AP', NULL, 0, 0, 'ap', 'ap', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(12, 'DHCP', NULL, 1, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(13, 'Guests', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 4, 1, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(0, '!Any', NULL, 0, 0, '/etc/nagios/any', 'generic-host', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(1, 'Servers', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(2, 'Administrators', NULL, 0, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(3, 'Users', NULL, 0, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(4, 'VOIP', NULL, 0, 0, 'voip', 'voip', 1, NULL, 1, 4, 5, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(5, 'IPCAM', NULL, 0, 0, 'videocam', 'ip-cam', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(6, 'Printers', NULL, 0, 0, 'printers', 'printers', 1, 'printer-service', 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(7, 'Switches', NULL, 0, 0, 'switches', 'switches', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(8, 'UPS', NULL, 0, 0, 'ups', 'ups', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(9, 'Security', NULL, 0, 0, 'security', 'security', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(10, 'Routers', NULL, 0, 0, 'routers', 'routers', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(11, 'WiFi AP', NULL, 0, 0, 'ap', 'ap', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(12, 'DHCP', NULL, 1, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(13, 'Guests', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 4, 1, '24.00', NULL);
 
 INSERT INTO `queue_list` (`id`, `queue_name`, `Download`, `Upload`) VALUES(0, 'unlimited', 0, 0);
 INSERT INTO `queue_list` (`id`, `queue_name`, `Download`, `Upload`) VALUES(1, '2M/2M', 2048, 2048);

+ 4 - 4
docs/databases/mysql/ru/create_db.sql

@@ -256,7 +256,7 @@ CREATE TABLE `mac_vendors` (
   `companyAddress` varchar(255) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
 
-CREATE TABLE `OU` (
+CREATE TABLE `ou` (
   `id` int(11) NOT NULL,
   `ou_name` varchar(40) DEFAULT NULL,
   `description` varchar(250) DEFAULT NULL,
@@ -579,9 +579,9 @@ ALTER TABLE `mac_vendors`
   ADD PRIMARY KEY (`id`),
   ADD KEY `oui` (`oui`);
 
-ALTER TABLE `OU`
+ALTER TABLE `ou`
   ADD PRIMARY KEY (`id`);
-ALTER TABLE `OU` ADD FULLTEXT KEY `ou_name` (`ou_name`);
+ALTER TABLE `ou` ADD FULLTEXT KEY `ou_name` (`ou_name`);
 
 ALTER TABLE `queue_list`
   ADD PRIMARY KEY (`id`),
@@ -735,7 +735,7 @@ ALTER TABLE `mac_history`
 ALTER TABLE `mac_vendors`
   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
-ALTER TABLE `OU`
+ALTER TABLE `ou`
   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 
 ALTER TABLE `queue_list`

+ 14 - 14
docs/databases/mysql/ru/data.sql

@@ -196,20 +196,20 @@ INSERT INTO `group_list` (`id`, `instance_id`, `group_name`, `description`) VALU
 INSERT INTO `group_list` (`id`, `instance_id`, `group_name`, `description`) VALUES(1, 1, 'Allow all', 'Разрешено всё');
 INSERT INTO `group_list` (`id`, `instance_id`, `group_name`, `description`) VALUES(2, 1, 'Users','Для пользователей');
 
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(0, '!Всё', NULL, 0, 0, '/etc/nagios/any', 'generic-host', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(1, 'Сервера', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(2, 'Администраторы', NULL, 0, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(3, 'Пользователи', NULL, 0, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(4, 'VOIP', NULL, 0, 0, 'voip', 'voip', 1, NULL, 1, 4, 5, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(5, 'IPCAM', NULL, 0, 0, 'videocam', 'ip-cam', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(6, 'Принтеры', NULL, 0, 0, 'printers', 'printers', 1, 'printer-service', 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(7, 'Свичи', NULL, 0, 0, 'switches', 'switches', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(8, 'UPS', NULL, 0, 0, 'ups', 'ups', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(9, 'Охрана', NULL, 0, 0, 'security', 'security', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(10, 'Роутеры', NULL, 0, 0, 'routers', 'routers', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(11, 'WiFi AP', NULL, 0, 0, 'ap', 'ap', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(12, 'DHCP', NULL, 1, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
-INSERT INTO `OU` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(13, 'Гости', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 4, 1, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(0, '!Всё', NULL, 0, 0, '/etc/nagios/any', 'generic-host', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(1, 'Сервера', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(2, 'Администраторы', NULL, 0, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(3, 'Пользователи', NULL, 0, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(4, 'VOIP', NULL, 0, 0, 'voip', 'voip', 1, NULL, 1, 4, 5, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(5, 'IPCAM', NULL, 0, 0, 'videocam', 'ip-cam', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(6, 'Принтеры', NULL, 0, 0, 'printers', 'printers', 1, 'printer-service', 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(7, 'Свичи', NULL, 0, 0, 'switches', 'switches', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(8, 'UPS', NULL, 0, 0, 'ups', 'ups', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(9, 'Охрана', NULL, 0, 0, 'security', 'security', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(10, 'Роутеры', NULL, 0, 0, 'routers', 'routers', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(11, 'WiFi AP', NULL, 0, 0, 'ap', 'ap', 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(12, 'DHCP', NULL, 1, 0, NULL, NULL, 1, NULL, 0, 0, 0, 0, '24.00', NULL);
+INSERT INTO `ou` (`id`, `ou_name`, `description`, `default_users`, `default_hotspot`, `nagios_dir`, `nagios_host_use`, `nagios_ping`, `nagios_default_service`, `enabled`, `filter_group_id`, `queue_id`, `dynamic`, `life_duration`, `parent_id`) VALUES(13, 'Гости', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 4, 1, '24.00', NULL);
 
 INSERT INTO `queue_list` (`id`, `queue_name`, `Download`, `Upload`) VALUES(0, 'unlimited', 0, 0);
 INSERT INTO `queue_list` (`id`, `queue_name`, `Download`, `Upload`) VALUES(1, '2M/2M', 2048, 2048);

+ 4 - 4
docs/databases/postgres/en/create_db.sql

@@ -344,7 +344,7 @@ COMMENT ON TABLE mac_vendors IS 'MAC address vendor database';
 COMMENT ON COLUMN mac_vendors.oui IS 'Organizationally Unique Identifier (first 6 MAC characters)';
 
 -- Organizational Units
-CREATE TABLE OU (
+CREATE TABLE ou (
 id SERIAL PRIMARY KEY,
 ou_name VARCHAR(40),
 description VARCHAR(250),
@@ -361,9 +361,9 @@ dynamic SMALLINT NOT NULL DEFAULT 0,
 life_duration DECIMAL(10,2) NOT NULL DEFAULT 24.00,
 parent_id INTEGER
 );
-COMMENT ON TABLE OU IS 'Organizational Units (departments/groups)';
-COMMENT ON COLUMN OU.ou_name IS 'OU name/identifier';
-COMMENT ON COLUMN OU.life_duration IS 'Default lifetime in hours for dynamic OUs';
+COMMENT ON TABLE ou IS 'Organizational Units (departments/groups)';
+COMMENT ON COLUMN ou.ou_name IS 'ou name/identifier';
+COMMENT ON COLUMN ou.life_duration IS 'Default lifetime in hours for dynamic OUs';
 
 -- Traffic shaping queues
 CREATE TABLE queue_list (

+ 3 - 3
docs/databases/postgres/en/data.sql

@@ -288,7 +288,7 @@ ON CONFLICT (id) DO UPDATE SET
     description = EXCLUDED.description;
 
 -- Organizational Units
-INSERT INTO OU (id, ou_name, description, default_users, default_hotspot, nagios_dir, nagios_host_use, nagios_ping, nagios_default_service, enabled, filter_group_id, queue_id, dynamic, life_duration, parent_id)
+INSERT INTO ou (id, ou_name, description, default_users, default_hotspot, nagios_dir, nagios_host_use, nagios_ping, nagios_default_service, enabled, filter_group_id, queue_id, dynamic, life_duration, parent_id)
 VALUES
 (0, '!Any', NULL, 0, 0, '/etc/nagios/any', 'generic-host', 1, NULL, 0, 0, 0, 0, 24.00, NULL),
 (1, 'Servers', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 0, 0, 24.00, NULL),
@@ -505,7 +505,7 @@ SELECT setval(pg_get_serial_sequence('device_models', 'id'), COALESCE((SELECT MA
 SELECT setval(pg_get_serial_sequence('device_types', 'id'), COALESCE((SELECT MAX(id) FROM device_types), 0) + 1);
 SELECT setval(pg_get_serial_sequence('filter_instances', 'id'), COALESCE((SELECT MAX(id) FROM filter_instances), 0) + 1);
 SELECT setval(pg_get_serial_sequence('group_list', 'id'), COALESCE((SELECT MAX(id) FROM group_list), 0) + 1);
-SELECT setval(pg_get_serial_sequence('OU', 'id'), COALESCE((SELECT MAX(id) FROM OU), 0) + 1);
+SELECT setval(pg_get_serial_sequence('ou', 'id'), COALESCE((SELECT MAX(id) FROM ou), 0) + 1);
 SELECT setval(pg_get_serial_sequence('queue_list', 'id'), COALESCE((SELECT MAX(id) FROM queue_list), 0) + 1);
 SELECT setval(pg_get_serial_sequence('subnets', 'id'), COALESCE((SELECT MAX(id) FROM subnets), 0) + 1);
 SELECT setval(pg_get_serial_sequence('vendors', 'id'), COALESCE((SELECT MAX(id) FROM vendors), 0) + 1);
@@ -527,7 +527,7 @@ BEGIN
     RAISE NOTICE '  - device_types: %', (SELECT COUNT(*) FROM device_types);
     RAISE NOTICE '  - filter_instances: %', (SELECT COUNT(*) FROM filter_instances);
     RAISE NOTICE '  - group_list: %', (SELECT COUNT(*) FROM group_list);
-    RAISE NOTICE '  - OU: %', (SELECT COUNT(*) FROM OU);
+    RAISE NOTICE '  - ou: %', (SELECT COUNT(*) FROM ou);
     RAISE NOTICE '  - queue_list: %', (SELECT COUNT(*) FROM queue_list);
     RAISE NOTICE '  - subnets: %', (SELECT COUNT(*) FROM subnets);
     RAISE NOTICE '  - vendors: %', (SELECT COUNT(*) FROM vendors);

+ 3 - 3
docs/databases/postgres/ru/create_db.sql

@@ -344,7 +344,7 @@ COMMENT ON TABLE mac_vendors IS 'База данных производител
 COMMENT ON COLUMN mac_vendors.oui IS 'Organizationally Unique Identifier (первые 6 символов MAC)';
 
 -- Организационные единицы
-CREATE TABLE OU (
+CREATE TABLE ou (
 id SERIAL PRIMARY KEY,
 ou_name VARCHAR(40),
 description VARCHAR(250),
@@ -362,8 +362,8 @@ life_duration DECIMAL(10,2) NOT NULL DEFAULT 24.00,
 parent_id INTEGER
 );
 COMMENT ON TABLE OU IS 'Организационные единицы (отделы/группы)';
-COMMENT ON COLUMN OU.ou_name IS 'Имя/идентификатор OU';
-COMMENT ON COLUMN OU.life_duration IS 'Время жизни по умолчанию в часах для динамических OU';
+COMMENT ON COLUMN ou.ou_name IS 'Имя/идентификатор ou';
+COMMENT ON COLUMN ou.life_duration IS 'Время жизни по умолчанию в часах для динамических записей';
 
 -- Очереди шейпинга трафика
 CREATE TABLE queue_list (

+ 3 - 3
docs/databases/postgres/ru/data.sql

@@ -281,7 +281,7 @@ ON CONFLICT (id) DO UPDATE SET
     description = EXCLUDED.description;
 
 -- Organizational Units (русские названия)
-INSERT INTO OU (id, ou_name, description, default_users, default_hotspot, nagios_dir, nagios_host_use, nagios_ping, nagios_default_service, enabled, filter_group_id, queue_id, dynamic, life_duration, parent_id)
+INSERT INTO ou (id, ou_name, description, default_users, default_hotspot, nagios_dir, nagios_host_use, nagios_ping, nagios_default_service, enabled, filter_group_id, queue_id, dynamic, life_duration, parent_id)
 VALUES
 (0, '!Всё', NULL, 0, 0, '/etc/nagios/any', 'generic-host', 1, NULL, 0, 0, 0, 0, 24.00, NULL),
 (1, 'Сервера', NULL, 0, 0, NULL, NULL, 1, NULL, 1, 1, 0, 0, 24.00, NULL),
@@ -498,7 +498,7 @@ SELECT setval(pg_get_serial_sequence('device_models', 'id'), COALESCE((SELECT MA
 SELECT setval(pg_get_serial_sequence('device_types', 'id'), COALESCE((SELECT MAX(id) FROM device_types), 0) + 1);
 SELECT setval(pg_get_serial_sequence('filter_instances', 'id'), COALESCE((SELECT MAX(id) FROM filter_instances), 0) + 1);
 SELECT setval(pg_get_serial_sequence('group_list', 'id'), COALESCE((SELECT MAX(id) FROM group_list), 0) + 1);
-SELECT setval(pg_get_serial_sequence('OU', 'id'), COALESCE((SELECT MAX(id) FROM OU), 0) + 1);
+SELECT setval(pg_get_serial_sequence('ou', 'id'), COALESCE((SELECT MAX(id) FROM ou), 0) + 1);
 SELECT setval(pg_get_serial_sequence('queue_list', 'id'), COALESCE((SELECT MAX(id) FROM queue_list), 0) + 1);
 SELECT setval(pg_get_serial_sequence('subnets', 'id'), COALESCE((SELECT MAX(id) FROM subnets), 0) + 1);
 SELECT setval(pg_get_serial_sequence('vendors', 'id'), COALESCE((SELECT MAX(id) FROM vendors), 0) + 1);
@@ -520,7 +520,7 @@ BEGIN
     RAISE NOTICE '  - device_types: %', (SELECT COUNT(*) FROM device_types);
     RAISE NOTICE '  - filter_instances: %', (SELECT COUNT(*) FROM filter_instances);
     RAISE NOTICE '  - group_list: %', (SELECT COUNT(*) FROM group_list);
-    RAISE NOTICE '  - OU: %', (SELECT COUNT(*) FROM OU);
+    RAISE NOTICE '  - ou: %', (SELECT COUNT(*) FROM ou);
     RAISE NOTICE '  - queue_list: %', (SELECT COUNT(*) FROM queue_list);
     RAISE NOTICE '  - subnets: %', (SELECT COUNT(*) FROM subnets);
     RAISE NOTICE '  - vendors: %', (SELECT COUNT(*) FROM vendors);

+ 28 - 23
install-eye.sh

@@ -302,17 +302,18 @@ install_deps_altlinux() {
 }
 
 # Install dependencies for Debian/Ubuntu
-install_deps_altlinux() {
-    print_step "Installing dependencies for ALT Linux"
+install_deps_debian() {
+    print_step "Installing dependencies for Debian/Ubuntu"
     apt-get update
 
     # Общие утилиты (всегда нужны)
-    apt-get install -y git wget rsync xxd hwdata pwgen
+    apt-get install -y git wget rsync xxd hwdata pwgen bsdmainutils
 
     # === Локальная база данных (если выбрана) ===
     if [[ "$DB_INSTALL" == "local" ]]; then
         if [[ "$DB_TYPE" == "postgresql" ]]; then
-            apt-get install -y postgresql17 postgresql17-server postgresql17-contrib postgresql17-perl
+            # Устанавливаем generic-пакеты PostgreSQL
+            apt-get install -y postgresql postgresql-contrib postgresql-server-dev-all
         else
             apt-get install -y mariadb-server mariadb-client
         fi
@@ -320,40 +321,44 @@ install_deps_altlinux() {
 
     # === Веб-интерфейс (если нужен) ===
     if [[ "$INSTALL_TYPE" == "full" || "$INSTALL_TYPE" == "web" ]]; then
-        apt-get install -y apache2 php8.2 php8.2-fpm-fcgi apache2-mod_fcgid \
-            php8.2-intl php8.2-mbstring php8.2-snmp php8.2-zip pear-Mail
+        apt-get install -y apache2 libapache2-mod-fcgid \
+            php php-fpm \
+            php-bcmath php-intl php-mbstring php-snmp php-zip php-mail \
+            php-date php-db
 
         if [[ "$DB_TYPE" == "postgresql" ]]; then
-            apt-get install -y php8.2-pgsql php8.2-pdo_pgsql
+            apt-get install -y php-pgsql
         else
-            apt-get install -y php8.2-mysqlnd php8.2-pdo_mysql php8.2-mysqlnd-mysqli
+            apt-get install -y php-mysql
         fi
     fi
 
     # === Сетевой бэкенд (если нужен) ===
     if [[ "$INSTALL_TYPE" == "full" || "$INSTALL_TYPE" == "backend" ]]; then
-        apt-get install -y fping dnsmasq syslog-ng syslog-ng-journal
+        apt-get install -y fping dnsmasq syslog-ng
 
-        # Общие Perl-модули (независимо от СУБД)
+        # Perl и обязательные модули (имена корректны для Ubuntu 24.04)
         apt-get install -y perl \
-            perl-Net-Patricia perl-NetAddr-IP perl-Config-Tiny \
-            perl-Net-DNS perl-DateTime perl-Net-Ping \
-            perl-Net-Netmask perl-Text-Iconv perl-Net-SNMP \
-            perl-Net-Telnet perl-DBI \
-            perl-Parallel-ForkManager perl-Proc-Daemon \
-            perl-DateTime-Format-DateParse \
-            perl-Net-OpenSSH perl-File-Tail \
-            perl-Crypt-Rijndael perl-Crypt-CBC perl-CryptX perl-Crypt-DES \
-            perl-File-Path-Tiny perl-Expect perl-Proc-ProcessTable
-
-        # Специфичные DBD-драйверы
+            libnet-patricia-perl libnetaddr-ip-perl libconfig-tiny-perl \
+            libnet-dns-perl libdatetime-perl libnet-netmask-perl \
+            libtext-iconv-perl libnet-snmp-perl libnet-telnet-perl \
+            libdbi-perl libparallel-forkmanager-perl libproc-daemon-perl \
+            libdatetime-format-dateparse-perl libnetwork-ipv4addr-perl \
+            libnet-openssh-perl libfile-tail-perl \
+            libcrypt-rijndael-perl libcrypt-cbc-perl libcryptx-perl \
+            libcrypt-des-perl libfile-path-tiny-perl libexpect-perl
+
+        # DBD-драйверы
         if [[ "$DB_TYPE" == "postgresql" ]]; then
-            apt-get install -y perl-DBD-Pg
+            apt-get install -y libdbd-pg-perl
         else
-            apt-get install -y perl-DBD-mysql
+            apt-get install -y libdbd-mysql-perl
         fi
     fi
 
+    # === Дополнительно (если нужно) ===
+    # Раскомментируйте, если требуется DNS-сервер
+    # apt-get install -y bind9 bind9-utils bind9-host
 }
 
 # System update

+ 14 - 0
scripts/updates/3-0-1/migration.msql

@@ -1,6 +1,7 @@
 -- Переименование таблиц в нижний регистр
 
 RENAME TABLE Customers TO customers;
+RENAME TABLE OU TO ou;
 RENAME TABLE User_auth TO user_auth;
 RENAME TABLE User_list TO user_list;
 RENAME TABLE User_stats TO user_stats;
@@ -53,6 +54,19 @@ ALTER TABLE wan_stats       CHANGE COLUMN `time` ts TIMESTAMP NOT NULL DEFAULT C
 ALTER TABLE remote_syslog   CHANGE COLUMN `date` ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
 
 -- comment → description
+-- fallback - add comment if not exists
+ALTER TABLE acl ADD COLUMN comment VARCHAR(250);
+ALTER TABLE building ADD COLUMN comment VARCHAR(250);
+ALTER TABLE devices ADD COLUMN comment VARCHAR(255);
+ALTER TABLE filter_instances ADD COLUMN comment VARCHAR(200);
+ALTER TABLE filter_list ADD COLUMN comment VARCHAR(250);
+ALTER TABLE group_list ADD COLUMN comment VARCHAR(250);
+ALTER TABLE ou ADD COLUMN comment VARCHAR(250);
+ALTER TABLE subnets ADD COLUMN comment VARCHAR(250);
+ALTER TABLE user_list ADD COLUMN comment VARCHAR(255);
+ALTER TABLE vendors ADD COLUMN comment VARCHAR(255);
+
+-- rename comment
 ALTER TABLE acl             CHANGE COLUMN `comment` description VARCHAR(250);
 ALTER TABLE building        CHANGE COLUMN `comment` description VARCHAR(250);
 ALTER TABLE devices         CHANGE COLUMN `comment` description VARCHAR(255);

+ 1 - 0
scripts/updates/3-0-1/migration.psql

@@ -1,6 +1,7 @@
 -- Переименование таблиц в нижний регистр (snake_case)
 
 ALTER TABLE "Customers" RENAME TO customers;
+ALTER TABLE "OU" RENAME TO ou;
 ALTER TABLE "User_auth" RENAME TO user_auth;
 ALTER TABLE "User_list" RENAME TO user_list;
 ALTER TABLE "User_stats" RENAME TO user_stats;