Bring network platform sites' networks and VLANs into their clients' networks, matched by subnet and kept up detail by detail, with a platform card on the network page, with database 4.1.6

This commit is contained in:
johnnyq
2026-11-23 00:57:43 -05:00
parent 3171cb367d
commit 47deaba513
12 changed files with 572 additions and 21 deletions

View File

@@ -0,0 +1,36 @@
<?php
/*
* ITFlow - Database update to version 4.1.6 (from 4.1.5)
* Included by admin/database_updates.php - do not access directly
*
* A network platform's networks and VLANs, kept up as its sites' clients' networks
* (functions/rmm_network.php).
*
* rmm_networks one network of a platform's site, and the ITFlow network it is - 0 once
* that was deleted in ITFlow, so it isn't made again (Bring back resets it).
* rmm_network_synced is the JSON of what the sync last wrote to each detail,
* so a detail changed in ITFlow is left as it is.
*
* Re-runnable: it only adds what isn't there.
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
mysqli_query($mysqli, "CREATE TABLE IF NOT EXISTS `rmm_networks` (
`rmm_network_id` int(11) NOT NULL AUTO_INCREMENT,
`rmm_network_provider_id` int(11) NOT NULL,
`rmm_network_rmm_client_id` int(11) NOT NULL,
`rmm_network_remote_id` varchar(100) NOT NULL,
`rmm_network_client_id` int(11) NOT NULL DEFAULT 0,
`rmm_network_network_id` int(11) NOT NULL DEFAULT 0,
`rmm_network_name` varchar(200) NOT NULL DEFAULT '',
`rmm_network_synced` text DEFAULT NULL,
`rmm_network_synced_at` datetime DEFAULT NULL,
`rmm_network_removed_at` datetime DEFAULT NULL,
`rmm_network_created_at` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`rmm_network_id`),
UNIQUE KEY `rmm_network_remote` (`rmm_network_provider_id`, `rmm_network_rmm_client_id`, `rmm_network_remote_id`),
KEY `rmm_network_network_id` (`rmm_network_network_id`),
KEY `rmm_network_client_id` (`rmm_network_client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci");