This commit captures 20 days of development work (Oct 28 - Nov 17, 2025) including Phase 2 PC migration, network device unification, and numerous bug fixes and enhancements. ## Major Changes ### Phase 2: PC Migration to Unified Machines Table - Migrated all PCs from separate `pc` table to unified `machines` table - PCs identified by `pctypeid IS NOT NULL` in machines table - Updated all display, add, edit, and update pages for PC functionality - Comprehensive testing: 15 critical pages verified working ### Network Device Infrastructure Unification - Unified network devices (Switches, Servers, Cameras, IDFs, Access Points) into machines table using machinetypeid 16-20 - Updated vw_network_devices view to query both legacy tables and machines table - Enhanced network_map.asp to display all device types from machines table - Fixed location display for all network device types ### Machine Management System - Complete machine CRUD operations (Create, Read, Update, Delete) - 5-tab interface: Basic Info, Network, Relationships, Compliance, Location - Support for multiple network interfaces (up to 3 per machine) - Machine relationships: Controls (PC→Equipment) and Dualpath (redundancy) - Compliance tracking with third-party vendor management ### Bug Fixes (Nov 7-14, 2025) - Fixed editdevice.asp undefined variable (pcid → machineid) - Migrated updatedevice.asp and updatedevice_direct.asp to Phase 2 schema - Fixed network_map.asp to show all network device types - Fixed displaylocation.asp to query machines table for network devices - Fixed IP columns migration and compliance column handling - Fixed dateadded column errors in network device pages - Fixed PowerShell API integration issues - Simplified displaypcs.asp (removed IP and Machine columns) ### Documentation - Created comprehensive session summaries (Nov 10, 13, 14) - Added Machine Quick Reference Guide - Documented all bug fixes and migrations - API documentation for ASP endpoints ### Database Schema Updates - Phase 2 migration scripts for PC consolidation - Phase 3 migration scripts for network devices - Updated views to support hybrid table approach - Sample data creation/removal scripts for testing ## Files Modified (Key Changes) - editdevice.asp, updatedevice.asp, updatedevice_direct.asp - network_map.asp, network_devices.asp, displaylocation.asp - displaypcs.asp, displaypc.asp, displaymachine.asp - All machine management pages (add/edit/save/update) - save_network_device.asp (fixed machine type IDs) ## Testing Status - 15 critical pages tested and verified - Phase 2 PC functionality: 100% working - Network device display: 100% working - Security: All queries use parameterized commands ## Production Readiness - Core functionality complete and tested - 85% production ready - Remaining: Full test coverage of all 123 ASP pages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
989 lines
103 KiB
SQL
989 lines
103 KiB
SQL
CREATE TABLE IF NOT EXISTS `printers` (
|
|
`printerid` int(11) NOT NULL AUTO_INCREMENT,
|
|
`modelid` int(11) DEFAULT '1',
|
|
`printerwindowsname` tinytext,
|
|
`printercsfname` tinytext,
|
|
`serialnumber` tinytext,
|
|
`fqdn` tinytext,
|
|
`ipaddress` tinytext,
|
|
`machineid` int(11) DEFAULT '1' COMMENT 'Which machine is this printer closet to\r\nCould be a location such as office/shipping if islocationonly bit is set in machines table',
|
|
`maptop` int(11) DEFAULT NULL,
|
|
`mapleft` int(11) DEFAULT NULL,
|
|
`iscsf` bit(1) DEFAULT b'0' COMMENT 'Does CSF print to this',
|
|
`installpath` varchar(100) DEFAULT NULL,
|
|
`isactive` bit(1) DEFAULT b'1',
|
|
`lastupdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
`printernotes` tinytext,
|
|
`printerpin` int(10) DEFAULT NULL,
|
|
PRIMARY KEY (`printerid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;
|
|
|
|
-- Dumping data for table shopdb.printers: ~45 rows (approximately)
|
|
DELETE FROM `printers`;
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(1, 13, 'TBD', '', '4HX732754', 'Printer-10-80-92-70.printer.geaerospace.net', '10.80.92.70', 27, NULL, NULL, b'1', '', b'0', '2025-09-30 15:59:33', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(2, 15, 'Southern Office HP Color LaserJet CP2025', '', 'CNGSC23135', 'Printer-10-80-92-63.printer.geaerospace.net', '10.80.92.63', 28, NULL, NULL, b'1', './installers/printers/HP-CP2025-Installer.exe', b'0', '2025-10-02 12:05:49', NULL, 1851850);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(3, 20, 'Southern Office Versalink B7125', 'NONE', 'QPA084128', 'Printer-10-80-92-48.printer.geaerospace.net', '10.80.92.48', 28, 2056, 662, b'1', './installers/printers/Printer-Coaching-CopyRoom-Versalink-B7125.exe', b'1', '2025-11-07 15:04:20', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(4, 19, 'Coaching Office 115 Versalink C7125', '', 'QPH230489', 'Printer-10-80-92-69.printer.geaerospace.net', '10.80.92.69', 30, 1902, 1379, b'1', './installers/printers/Printer-Coaching-115-Versalink-C7125.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(6, 18, 'Coaching 112 LaserJet M254dw', '', 'VNB3N34504', 'Printer-10-80-92-52.printer.geaerospace.net', '10.80.92.52', 31, 2036, 1417, b'1', './installers/printers/Printer-Coaching-112-LaserJet-M254dw.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(7, 21, 'Materials Xerox EC8036', 'CSF01', 'QMK003729', 'Printer-10-80-92-62.printer.geaerospace.net', '10.80.92.62', 32, 1921, 1501, b'1', './installers/printers/Materials-Xerox-EC8036.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(8, 22, 'PE Office Versalink C8135', '', 'ELQ587561', 'Printer-10-80-92-49.printer.geaerospace.net', '10.80.92.49', 33, 1995, 934, b'1', './installers/printers/Printer-PE-Office-Altalink-C8135.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(9, 18, 'WJWT05-HP-Laserjet', 'CSF04', 'VNB3T19380', 'Printer-10-80-92-67.printer.geaerospace.net', '10.80.92.67', 34, 1267, 536, b'0', './installers/printers/Printer-WJWT05.exe', b'1', '2025-11-13 12:34:19', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(10, 24, 'CSF11-CMM07-HP-LaserJet', 'CSF11', 'PHBBG65860', 'Printer-10-80-92-55.printer.geaerospace.net', '10.80.92.55', 13, 942, 474, b'1', '', b'1', '2025-11-07 20:14:25', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(11, 19, 'Router Room Printer', '', 'QPH233211', 'Printer-10-80-92-20.printer.geaerospace.net', '10.80.92.20', 35, 810, 1616, b'1', './installers/printers/Printer-RouterRoom-Versalink-C7125.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(12, 28, 'TBD 4250tn', 'HP4250_IMPACT', 'CNRXL93253', 'Printer-10-80-92-61.printer.geaerospace.net', '10.80.92.61', 37, 806, 1834, b'0', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(13, 27, 'CSF09-2022-HP-LaserJet', 'CSF09', 'CNBCN2J1RQ', 'Printer-10-80-92-57.printer.geaerospace.net', '10.80.92.57', 38, 777, 665, b'1', './installers/printers/Printer-2022.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(14, 28, 'CSF06-3037-HP-LaserJet', 'CSF06', 'USBXX23084', 'Printer-10-80-92-54.printer.geaerospace.net', '10.80.92.54', 39, 1752, 1087, b'1', './installers/printers/Printer-3037.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(16, 21, 'EC8036', '', 'QMK002012', 'Printer-10-80-92-253.printer.geaerospace.net', '10.80.92.253', 37, 806, 1834, b'0', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(17, 25, 'CSF18-Blisk-Inspection-HP-LaserJet', 'CSF18', 'VNB0200170', 'Printer-10-80-92-23.printer.geaerospace.net', '10.80.92.23', 41, 889, 1287, b'1', './installers/printers/Printer-Blisk-Inspection-LaserJet-4100n.exe', b'1', '2025-11-03 17:45:45', NULL, 727887799);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(18, 20, 'Blisk Inspection Versalink B7125', '', 'QPA084129', 'Printer-10-80-92-45.printer.geaerospace.net', '10.80.92.45', 41, 889, 1287, b'0', './installers/printers/Printer-Blisk-Inspection-Versalink-B7125.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(20, 26, 'Near Wax trace 7', 'CSF22', 'PHDCB09198', 'Printer-10-80-92-28.printer.geaerospace.net', '10.80.92.28', 18, 1740, 1506, b'1', './installers/printers/Printer-WJWT07-LaserJet-M404n.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(21, 27, 'DT-Office-HP-Laserjet', '', 'CNBCN2J1RQ', 'Printer-10-80-92-68.printer.geaerospace.net', '10.80.92.68', 42, NULL, NULL, b'0', './installers/printers/Printer-DT-Office.exe', b'0', '2025-09-16 13:38:41', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(22, 27, 'CSF02-LocationTBD', 'CSF02', 'CNBCMD60NM', 'Printer-10-80-92-65.printer.geaerospace.net', '10.80.92.65', 1, NULL, NULL, b'0', '', b'1', '2025-11-03 17:32:40', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(23, 19, 'Office Admins Versalink C7125', '', 'QPH230648', 'Printer-10-80-92-25.printer.geaerospace.net', '10.80.92.25', 45, 1976, 1415, b'0', './installers/printers/Printer-Office-Admins-Versalink-C7125.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(24, 21, 'Southern Office Xerox EC8036', '', 'QMK002217', 'Printer-10-80-92-252.printer.geaerospace.net', '10.80.92.252', 28, 2043, 1797, b'0', './installers/printers/Printer-Office-CopyRoom-EC8036.exe', b'1', '2025-11-10 21:00:03', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(26, 30, 'USB - Zebra ZT411', '', '', '', '10.48.173.222', 37, 806, 1834, b'0', './installers/printers/zddriver-v1062228271-certified.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(28, 31, 'USB LaserJet M506', '', '', '', 'USB', 49, 2143, 1630, b'0', './installers/printers/Printer-GuardDesk-LaserJet-M506.zip', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(29, 32, 'USB Epson TM-C3500', '', '', '', 'USB', 49, 2143, 1630, b'0', './installers/printers/TMC3500_x64_v2602.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(30, 34, 'USB LaserJet M255dw', '', 'VNB33212344', '', 'USB', 50, 506, 2472, b'0', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(31, 18, 'USB LaserJet M254dw', '', 'VNBNM718PD', '', 'USB', 51, 450, 2524, b'0', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(32, 25, 'CSF07-3001-LaserJet-4001n', 'CSF07', 'VNB0200168', 'Printer-10-80-92-46.printer.geaerospace.net', '10.80.92.46', 52, 1417, 1802, b'1', './installers/printers/Printer-CSF07-3005-LaserJet-4100n.exe', b'1', '2025-10-23 19:27:06', NULL, 58737718);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(33, 26, 'FPI Inpection', 'CSF13', 'PHDCC20486', 'Printer-10-80-92-53.printer.geaerospace.net', '10.80.92.53', 53, 832, 1937, b'0', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(34, 19, '1364-Xerox-Versalink-C405', '', '4HX732754', 'Printer-10-80-92-70.printer.geaerospace.net', '10.80.92.70', 54, 346, 208, b'0', './installers/printers/Printer-1364-Xerox-Versalink-C405.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(35, 35, 'CSF15 6502 LaserJet M602', 'CSF15', 'JPBCD850FT', 'Printer-10-80-92-26.printer.geaerospace.net', '10.80.92.26', 48, 1139, 1715, b'1', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(36, 36, 'Lean Office Plotter', '', 'CN91P7H00J', 'Printer-10-80-92-24.printer.geaerospace.net', '10.80.92.24', 56, 2171, 1241, b'0', './installers/printers/Printer-Lean-Office-Plotter.exe', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(37, 13, '4007-Versalink', '', '4HX732754', 'Printer-10-80-92-70.printer.geaerospace.net', '10.80.92.70', 27, 1090, 2163, b'1', '', b'1', '2025-11-13 15:49:55', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(38, 72, 'TBD', '', '9HB669334', 'Printer-10-80-92-251.printer.geaerospace.net', '10.80.92.251', 224, 1221, 464, b'1', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(39, 73, 'CSF21-7701-HP-Laserjet', 'CSF21', 'VNB3C56224', 'Printer-10-80-92-51.printer.geaerospace.net', '10.80.92.51', 225, 573, 2181, b'0', '', b'1', '2025-10-28 13:20:14', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(40, 74, 'Blisk Clean Room Near Shipping', 'CSF12', 'JPDDS15219', 'Printer-10-80-92-56.printer.geaerospace.net', '10.80.92.56', 225, 523, 2135, b'0', NULL, b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(41, 28, 'TBD', 'CSF05', '4HX732754', 'Printer-10-80-92-71.printer.geaerospace.net', '10.80.92.71', 27, 972, 1978, b'1', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(42, 25, 'TBD', 'HP4001_SPOOLSHWACHEON', 'VNL0616417', 'Printer-10-80-92-22.printer.geaerospace.net', '10.80.92.22', 228, 1642, 2024, b'1', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(43, 25, 'TBD', '', 'VNL0303159', 'Printer-10-80-92-63.printer.geaerospace.net', '10.80.92.63', 258, 1792, 1916, b'1', '', b'1', '2025-11-07 15:05:51', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(44, 28, 'Gage Lab Printer', 'gage lab ', '4HX732754', '', '10.80.92.59', 27, 972, 1978, b'0', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(45, 35, 'Venture Clean Room', 'CSF08', '4HX732754', '', '10.80.92.58', 27, 972, 1978, b'1', '', b'1', '2025-10-23 19:27:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(46, 84, 'GuardDesk-HID-DTC-4500', '', 'B8021700', 'Printer-10-49-215-10.printer.geaerospace.net', '10.49.215.10', 49, 2155, 1639, b'0', '', b'1', '2025-10-29 00:56:37', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(47, 90, 'USB-6502-HP-LaserJect', '', 'VNB3C40601', '', '1.1.1.1', 48, 50, 50, b'0', NULL, b'1', '2025-11-03 18:00:43', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(48, 91, 'TBD', '', 'VNB3D55060', '', '10.80.92.60', 27, 50, 50, b'0', NULL, b'1', '2025-11-13 12:59:45', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(49, 96, '6502-LaserJet', '', 'VNB3C40601', 'Printer-10-49-215-13.printer.geaerospace.net', '10.49.215.13', 48, 1221, 1779, b'0', NULL, b'1', '2025-11-12 21:39:06', NULL, NULL);
|
|
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
|
(50, 97, '6503-LaserJet', '', 'VNB3F14243', 'Printer-10-49-215-14.printer.geaerospace.net', '10.49.215.14', 47, 1059, 1768, b'0', NULL, b'1', '2025-11-12 21:42:19', NULL, NULL);
|
|
|
|
-- Dumping structure for table shopdb.servers
|
|
CREATE TABLE IF NOT EXISTS `servers` (
|
|
`serverid` int(11) NOT NULL AUTO_INCREMENT,
|
|
`servername` varchar(100) DEFAULT NULL,
|
|
`modelid` int(11) DEFAULT NULL,
|
|
`serialnumber` varchar(100) DEFAULT NULL,
|
|
`ipaddress` varchar(45) DEFAULT NULL,
|
|
`description` varchar(255) DEFAULT NULL,
|
|
`isactive` bit(1) DEFAULT b'1',
|
|
`fqdn` varchar(50) DEFAULT NULL,
|
|
PRIMARY KEY (`serverid`),
|
|
KEY `idx_serialnumber` (`serialnumber`),
|
|
KEY `idx_ipaddress` (`ipaddress`),
|
|
KEY `idx_isactive` (`isactive`),
|
|
KEY `idx_servers_modelid` (`modelid`),
|
|
KEY `idx_servers_servername` (`servername`),
|
|
CONSTRAINT `fk_servers_model` FOREIGN KEY (`modelid`) REFERENCES `models` (`modelnumberid`) ON DELETE SET NULL
|
|
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='Servers';
|
|
|
|
-- Dumping data for table shopdb.servers: ~3 rows (approximately)
|
|
DELETE FROM `servers`;
|
|
INSERT INTO `servers` (`serverid`, `servername`, `modelid`, `serialnumber`, `ipaddress`, `description`, `isactive`, `fqdn`) VALUES
|
|
(1, 'AVEWP1760v02', NULL, '', '10.233.113.138', 'Historian Server', b'1', 'AVEWP1760v02.rd.ds.ge.com');
|
|
INSERT INTO `servers` (`serverid`, `servername`, `modelid`, `serialnumber`, `ipaddress`, `description`, `isactive`, `fqdn`) VALUES
|
|
(2, 'avewp4420v01 ', NULL, NULL, '10.233.113.137', 'Shop Floor Connect', b'1', 'avewp4420v01.rd.ds.ge.com');
|
|
INSERT INTO `servers` (`serverid`, `servername`, `modelid`, `serialnumber`, `ipaddress`, `description`, `isactive`, `fqdn`) VALUES
|
|
(3, 'NVR6-31RHVEFV4K', NULL, '31RHVEFV4K', ' 10.49.155.183 ', 'Avigilon CCTV', b'1', NULL);
|
|
|
|
-- Dumping structure for table shopdb.skilllevels
|
|
CREATE TABLE IF NOT EXISTS `skilllevels` (
|
|
`skilllevelid` tinyint(4) NOT NULL AUTO_INCREMENT,
|
|
`skilllevel` tinytext,
|
|
`isactive` bit(1) DEFAULT b'1',
|
|
PRIMARY KEY (`skilllevelid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
|
|
|
-- Dumping data for table shopdb.skilllevels: ~2 rows (approximately)
|
|
DELETE FROM `skilllevels`;
|
|
INSERT INTO `skilllevels` (`skilllevelid`, `skilllevel`, `isactive`) VALUES
|
|
(1, 'Lead Technical Machinist ', b'1');
|
|
INSERT INTO `skilllevels` (`skilllevelid`, `skilllevel`, `isactive`) VALUES
|
|
(2, 'Advanced Technical Machinist', b'1');
|
|
|
|
-- Dumping structure for table shopdb.subnets
|
|
CREATE TABLE IF NOT EXISTS `subnets` (
|
|
`subnetid` tinyint(4) NOT NULL AUTO_INCREMENT,
|
|
`vlan` smallint(6) DEFAULT NULL,
|
|
`description` varchar(300) DEFAULT NULL,
|
|
`ipstart` int(10) DEFAULT NULL,
|
|
`ipend` int(10) DEFAULT NULL,
|
|
`cidr` tinytext,
|
|
`isactive` bit(1) DEFAULT b'1',
|
|
`subnettypeid` tinyint(4) DEFAULT NULL,
|
|
PRIMARY KEY (`subnetid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8;
|
|
|
|
-- Dumping data for table shopdb.subnets: ~38 rows (approximately)
|
|
DELETE FROM `subnets`;
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(9, 101, 'User Vlan', 170951168, 170951679, '/23', b'1', 1);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(11, 852, 'OAVfeMUSwesj001-OT - Bond2.852 - Blisk A', 169632320, 169632383, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(12, 853, 'OAVfeMUSwesj001-OT - Bond2.853 - Blisk B', 169632384, 169632447, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(13, 635, 'Zscaler PSE (Private Service Edge)', 169709024, 169709031, '/29', b'1', 1);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(14, 632, 'Vault Untrust', 170960336, 170960351, '/28', b'1', 1);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(15, 2040, 'Wireless Machine Auth', 170981632, 170981695, '/26', b'1', 2);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(16, 633, 'Vault User Vlan', 172108800, 172109313, '/23', b'1', 1);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(17, 250, 'Wireless Users Blue SSO', 173038976, 173039039, '/26', b'1', 1);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(18, 2035, 'Wired Machine Auth', 176566272, 176566785, '/23', b'1', 2);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(19, 253, 'OAVfeMUSwesj001-SegIT - Bond2.253 - RFID', 170962368, 170962399, '/27', b'1', 5);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(20, 252, 'OAVfeMUSwesj001-SegIT - Bond2.252', 170961424, 170961439, '/28', b'1', 5);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(21, 866, 'OAVfeMUSwesj001-OT - Bond2.866 Turn/Burn B', 171033280, 171033343, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(22, 865, 'OAVfeMUSwesj001-OT - Bond2.866 Turn/Burn A', 171033216, 171033279, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(23, 850, 'OAVfeMUSwesj001-OT - Bond2.850 Inspection', 171026816, 171026879, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(24, 851, 'OAVfeMUSwesj001-OT - Bond2.851 - Watchdog', 171026736, 171026751, '/28', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(25, 864, 'OAVfeMUSwesj001-OT - Bond2.864 OT Manager', 171026704, 171026711, '/29', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(26, 1001, 'OAVfeMUSwesj001-OT - Bond2.1001 - Access Panels', 171023280, 171023295, '/28', b'0', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(27, 2090, 'OAVfeMUSwesj001-OT - Bond2.2090 - CCTV', 171023280, 171023295, '/28', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(28, 863, 'OAVfeMUSwesj001-OT - Bond2.863 - Venture B', 169633088, 169633151, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(29, 862, 'OAVfeMUSwesj001-OT - Bond2.862 - Venture A', 169633024, 169633087, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(30, 861, 'OAVfeMUSwesj001-OT - Bond2.861 - Spools B', 169632960, 169633023, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(31, 860, 'OAVfeMUSwesj001-OT - Bond2.860 - Spools A', 169632896, 169632959, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(32, 858, 'OAVfeMUSwesj001-OT - Bond2.858 - HPT A', 169632832, 169632895, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(33, 859, 'OAVfeMUSwesj001-OT - Bond2.859 - HPT B', 169632768, 169632831, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(34, 290, 'Printer Vlan', 171038464, 171038717, '/24', b'1', 1);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(35, 101, 'Legacy Printer Vlan', 173038592, 173038845, '24', b'1', 1);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(36, 857, 'OAVfeMUSwesj001-OT - Bond2.857 - Turbulence B', 169632640, 169632703, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(37, 856, 'OAVfeMUSwesj001-OT - Bond2.857 - Turbulence A', 169632640, 169632703, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(38, 855, 'OAVfeMUSwesj001-OT - Bond2.855 - Fab Shop B', 169632512, 169632575, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(39, 854, 'OAVfeMUSwesj001-OT - Bond2.854 - Fab Shop A', 169632576, 169632639, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(40, 853, 'OAVfeMUSwesj001-OT - Bond2.853 - Blisk B', 169632448, 169632511, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(41, 852, 'OAVfeMUSwesj001-OT - Bond2.852 - Blisk A', 169632320, 169632383, '/26', b'1', 3);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(42, 705, 'VAVfeXUSwesj001 - ETH8.705 - Zscaler', 183071168, 183071199, '/27', b'1', 4);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(43, 730, 'VAVfeXUSwesj001 - ETH8.730 - EC-Compute', 183071104, 183071167, '/26', b'1', 4);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(44, 740, 'VAVfeXUSwesj001 - ETH8.740 - EC-Compute-Mgt', 183071040, 183071071, '/27', b'1', 4);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(45, 720, 'VAVfeXUSwesj001 - ETH8.720 - EC-Network-MGT', 183071008, 183071023, '/28', b'1', 4);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(46, 710, 'VAVfeXUSwesj001 - ETH8.710 - EC-Security', 183070992, 183071007, '/28', b'1', 4);
|
|
INSERT INTO `subnets` (`subnetid`, `vlan`, `description`, `ipstart`, `ipend`, `cidr`, `isactive`, `subnettypeid`) VALUES
|
|
(47, 700, 'VAVfeXUSwesj001 - ETH8.700 - EC Transit', 183070976, 183070983, '/29', b'1', 4);
|
|
|
|
-- Dumping structure for table shopdb.subnettypes
|
|
CREATE TABLE IF NOT EXISTS `subnettypes` (
|
|
`subnettypeid` tinyint(4) NOT NULL AUTO_INCREMENT,
|
|
`subnettype` tinytext,
|
|
`isactive` bigint(20) DEFAULT '1',
|
|
`bgcolor` tinytext,
|
|
PRIMARY KEY (`subnettypeid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
|
|
|
|
-- Dumping data for table shopdb.subnettypes: ~5 rows (approximately)
|
|
DELETE FROM `subnettypes`;
|
|
INSERT INTO `subnettypes` (`subnettypeid`, `subnettype`, `isactive`, `bgcolor`) VALUES
|
|
(1, 'IT', 1, NULL);
|
|
INSERT INTO `subnettypes` (`subnettypeid`, `subnettype`, `isactive`, `bgcolor`) VALUES
|
|
(2, 'Machine Auth', 1, NULL);
|
|
INSERT INTO `subnettypes` (`subnettypeid`, `subnettype`, `isactive`, `bgcolor`) VALUES
|
|
(3, 'OT', 1, NULL);
|
|
INSERT INTO `subnettypes` (`subnettypeid`, `subnettype`, `isactive`, `bgcolor`) VALUES
|
|
(4, 'Vault', 1, NULL);
|
|
INSERT INTO `subnettypes` (`subnettypeid`, `subnettype`, `isactive`, `bgcolor`) VALUES
|
|
(5, 'Seg-IT', 1, NULL);
|
|
|
|
-- Dumping structure for table shopdb.supportteams
|
|
CREATE TABLE IF NOT EXISTS `supportteams` (
|
|
`supporteamid` int(11) NOT NULL AUTO_INCREMENT,
|
|
`teamname` char(50) DEFAULT NULL,
|
|
`teamurl` tinytext,
|
|
`appownerid` int(11) DEFAULT '1',
|
|
`isactive` bit(1) DEFAULT b'1',
|
|
PRIMARY KEY (`supporteamid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
|
|
|
|
-- Dumping data for table shopdb.supportteams: ~18 rows (approximately)
|
|
DELETE FROM `supportteams`;
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(1, '@AEROSPACE SOS NAMER USA NC WEST JEFFERSON', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3Deba582dfdba91348514e5d6e5e961957', 1, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(2, '@Aerospace UDC Support', 'https://geit.service-now.com/now/nav/ui/classic/params/target/cmdb_ci_appl.do%3Fsys_id%3D0b54012d4730515077587738436d436d%26sysparm_view%3D', 2, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(3, '@Aerospace UDC Support (DODA)', 'https://geit.service-now.com/now/nav/ui/classic/params/target/cmdb_ci_appl.do%3Fsys_id%3D0b54012d4730515077587738436d436d%26sysparm_view%3D', 3, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(4, '@AEROSPACE Lenel OnGuard Support', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3D9eecad259743a194390576b71153af07', 5, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(5, '@AEROSPACE ZIA Support', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3D6cde9ba13bc7ce505be7736aa5e45a84%26sysparm_view%3D', 6, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(6, '@L2 AV SCIT CSF App Spt', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3Da5210946db4bf2005e305f2e5e96190a%26sysparm_view%3D', 7, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(7, '@L2 AV SCIT Quality Web App Spt', 'https://geit.service-now.com/now/nav/ui/classic/params/target/u_cmdb_ci_app_environment.do%3Fsys_id%3Db6f242addbe54b00ba6c57e25e96193b%26sysparm_view%3D', 15, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(8, 'Hexagon Software', 'https://support.hexagonmi.com/s/', 1, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(9, 'Shopfloor Connect', '', 9, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(10, '@AEROSPACE OpsVision-Support', 'https://geit.service-now.com/now/nav/ui/classic/params/target/u_cmdb_ci_business_app.do%3Fsys_id%3D871ec8d0dbe66b80c12359d25e9619ac%26sysparm_view%3D', 10, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(11, '@GE CTCR Endpoint Security L3', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3Dd5f0f5f8db3185908f1eb3b2ba9619cf%26sysparm_view%3D', 11, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(12, '@AEROSPACE IT ERP Centerpiece - SYSOPS', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3De4430d0edb8bf2005e305f2e5e961901%26sysparm_view%3D', 12, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(13, '@AEROSPACE Everbridge Support', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3D1d8212833b2fde1073651f50c5e45a44%26sysparm_view%3D', 13, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(14, '@Aerospace L2 ETQ Application Support Team', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3Ddac4c186db0ff2005e305f2e5e961944%26sysparm_view%3D', 14, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(15, '@AEROSPACE AG DW Software Engineering', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3D9397143b939a1698a390fded1dba10da%26sysparm_view%3D', 16, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(16, '@L2 AV SCIT Maximo App Spt', 'https://geit.service-now.com/now/nav/ui/classic/params/target/u_cmdb_ci_app_environment.do%3Fsys_id%3D155b02e9dba94b00ba6c57e25e9619b4%26sysparm_view%3D', 17, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(17, '@Aerospace eMXSupportGroup', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3Dabf1cd8edb4bf2005e305f2e5e9619d1%26sysparm_view%3D', 18, b'1');
|
|
INSERT INTO `supportteams` (`supporteamid`, `teamname`, `teamurl`, `appownerid`, `isactive`) VALUES
|
|
(18, '@Aerospace IT PlantApps-US Prod Spt', 'https://geit.service-now.com/now/nav/ui/classic/params/target/sys_user_group.do%3Fsys_id%3D947c8babdb860110332c20c913961975%26sysparm_view%3D', 19, b'1');
|
|
|
|
-- Dumping structure for table shopdb.switches
|
|
CREATE TABLE IF NOT EXISTS `switches` (
|
|
`switchid` int(11) NOT NULL AUTO_INCREMENT,
|
|
`switchname` varchar(100) DEFAULT NULL,
|
|
`modelid` int(11) DEFAULT NULL,
|
|
`serialnumber` varchar(100) DEFAULT NULL,
|
|
`ipaddress` varchar(45) DEFAULT NULL,
|
|
`description` varchar(255) DEFAULT NULL,
|
|
`maptop` int(11) DEFAULT NULL,
|
|
`mapleft` int(11) DEFAULT NULL,
|
|
`isactive` bit(1) DEFAULT b'1',
|
|
PRIMARY KEY (`switchid`),
|
|
KEY `idx_serialnumber` (`serialnumber`),
|
|
KEY `idx_ipaddress` (`ipaddress`),
|
|
KEY `idx_isactive` (`isactive`),
|
|
KEY `idx_switches_modelid` (`modelid`),
|
|
KEY `idx_switches_switchname` (`switchname`),
|
|
CONSTRAINT `fk_switches_model` FOREIGN KEY (`modelid`) REFERENCES `models` (`modelnumberid`) ON DELETE SET NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Network switches';
|
|
|
|
-- Dumping data for table shopdb.switches: ~0 rows (approximately)
|
|
DELETE FROM `switches`;
|
|
|
|
-- Dumping structure for table shopdb.topics
|
|
CREATE TABLE IF NOT EXISTS `topics` (
|
|
`appid` tinyint(4) NOT NULL AUTO_INCREMENT,
|
|
`appname` char(50) NOT NULL,
|
|
`appdescription` char(50) DEFAULT NULL,
|
|
`supportteamid` int(11) NOT NULL DEFAULT '1',
|
|
`applicationnotes` varchar(255) DEFAULT NULL,
|
|
`installpath` varchar(255) DEFAULT NULL,
|
|
`documentationpath` varchar(512) DEFAULT NULL,
|
|
`isactive` bit(1) DEFAULT b'1',
|
|
`ishidden` bit(1) DEFAULT b'0' COMMENT 'Should this be displayed in all apps or not',
|
|
PRIMARY KEY (`appid`) USING BTREE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
|
|
|
|
-- Dumping data for table shopdb.topics: ~27 rows (approximately)
|
|
DELETE FROM `topics`;
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(1, 'West Jefferson', 'TBD', 1, 'Place Holder for Base Windows Installs', NULL, NULL, b'0', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(2, 'UDC', 'Universal Data Collector', 2, NULL, NULL, 'https://ge.sharepoint.us/sites/UniversalDataCollection-28UDC-29/SitePages/Home.aspx', b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(3, 'DODA', 'CMM Related', 3, NULL, 'https://ge.ent.box.com/folder/178044137180?amp;box_action=go_to_item&box_source=legacy-folder_collab_auto_accept_new&s=esxd09f65qrwjh497opk6losnnrwk3p1', NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(4, 'CLM', 'Legacy UDC', 2, 'This was replaced by UDC, but can be used as a failsafe', NULL, NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(5, '3 of 9 Fonts', 'Barcode Fonts', 1, 'This is required for Weld Data Sheets', './installers/3of9Barcode.exe', '', b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(6, 'PC - DMIS', NULL, 1, NULL, NULL, NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(7, 'Oracle 10.2', 'Required for Defect Tracker', 1, 'Required for to Fix Defect Tracker After PBR', NULL, NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(8, 'eMX', 'Eng Laptops', 2, 'This is required for Engineering Devices', NULL, NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(9, 'Adobe Logon Fix', '', 1, 'REBOOT REQUIRED: Stops Adobe Acrobat From Asking you to Logon after PBR', './installers/AdobeFix.exe', NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(10, 'Lenel OnGuard', 'Badging', 4, 'Required for Badging / Access Panel Contol', 'https://ge.ent.box.com/s/j1l0urjg80q0ltsvishq4i873fud2mk7', 'https://ge-my.sharepoint.us/:p:/r/personal/270002508_geaerospace_com/_layouts/15/doc2.aspx?sourcedoc=%7B65412AFE-2E2C-4525-BCDA-DD66E5EBAD16%7D&file=PBR%20-%20GE%20OnGurard%20Enterprise%208.0.4%20Installation%20Instructions%20AMERICAS.pptx&action=edit&mobileredirect=true&isSPOFile=1&ovuser=86b871ed-f0e7-4126-9bf4-5ee5cf19e256%2C270002508%40geaerospace.com&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yNTA3MDMxODgwNiIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D', b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(11, 'EssBase', 'Excel to Oracle DB Plugin', 1, 'Required for some Finance Operations / Excel', NULL, NULL, b'0', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(12, 'PE Office Plotter Drivers', 'PE Office Plotter Drivers', 1, '', './installers/PlotterInstaller.exe', NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(13, 'Zscaler', 'Zscaler ZPA Client', 5, '', 'https://ge.sharepoint.us/:u:/r/sites/DougsProductivityTeam_m/Shared%20Documents/General/1%20-%20Projects/Site%20PBR%20Project/GE%20Software%20-%20Post%20PBR/ZscalerInc._Zscaler_4.5.0.337_v2.EXE?csf=1&web=1&e=afesVD', NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(14, 'Network', '', 5, '', 'https://ge.sharepoint.us/:u:/r/sites/DougsProductivityTeam_m/Shared%20Documents/General/1%20-%20Projects/Site%20PBR%20Project/GE%20Software%20-%20Post%20PBR/ZscalerInc._Zscaler_4.5.0.337_v2.EXE?csf=1&web=1&e=afesVD', NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(15, 'Maximo', 'For site maintenence from Southern', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(16, 'RightCrowd', 'Vistor Requests Replaced HID in 2025', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(17, 'Printers', '', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(18, 'Process', '', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(19, 'Media Creator Lite', '', 1, NULL, './installers/GEAerospace_MediaCreatorLite_Latest.EXE', NULL, b'1', b'0');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(20, 'CMMC', '', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(21, 'Shopfloor PC', '', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(22, 'CSF', 'Common Shop Floor', 6, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(23, 'Plantapps', '', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(24, 'Everbridge', '', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(26, 'PBR', '', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(27, 'Bitlocker', '', 1, NULL, NULL, NULL, b'1', b'1');
|
|
INSERT INTO `topics` (`appid`, `appname`, `appdescription`, `supportteamid`, `applicationnotes`, `installpath`, `documentationpath`, `isactive`, `ishidden`) VALUES
|
|
(28, 'FlowXpert', 'Waterjet Software Req License File', 1, 'License file needs to be KBd', './installers/FlowXpert.zip', NULL, b'1', b'0');
|
|
|
|
-- Dumping structure for table shopdb.vendors
|
|
CREATE TABLE IF NOT EXISTS `vendors` (
|
|
`vendorid` int(11) NOT NULL AUTO_INCREMENT,
|
|
`vendor` char(50) DEFAULT NULL,
|
|
`isactive` char(50) DEFAULT '1',
|
|
`isprinter` bit(1) DEFAULT b'0',
|
|
`ispc` bit(1) DEFAULT b'0',
|
|
`ismachine` bit(1) DEFAULT b'0',
|
|
`isserver` bit(1) DEFAULT b'0',
|
|
`isswitch` bit(1) DEFAULT b'0',
|
|
`iscamera` bit(1) DEFAULT b'0',
|
|
PRIMARY KEY (`vendorid`) USING BTREE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COMMENT='Who Makes the Machine this PC Front Ends';
|
|
|
|
-- Dumping data for table shopdb.vendors: ~32 rows (approximately)
|
|
DELETE FROM `vendors`;
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(1, 'WJDT', '1', b'0', b'0', b'0', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(2, 'Toshulin', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(3, 'Grob', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(4, 'Okuma', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(5, 'Campbell', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(6, 'Hwacheon', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(7, 'Hexagon', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(8, 'Brown/Sharpe', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(9, 'Xerox', '1', b'1', b'0', b'0', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(10, 'Mitutoyo', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(11, 'HP', '1', b'1', b'0', b'0', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(12, 'Dell Inc.', '1', b'0', b'1', b'0', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(13, 'DMG Mori', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(14, 'Zebra', '1', b'1', b'0', b'0', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(15, 'Epson', '1', b'1', b'0', b'0', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(16, 'Eddy', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(17, 'OKK', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(18, 'LaPointe', '1', b'0', NULL, b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(19, 'Fidia', '1', b'0', NULL, b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(20, 'GM Enterprises', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(21, 'Makino', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(22, 'TBD', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(23, 'Gleason-Pfauter', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(24, 'Broach', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(25, 'Fanuc', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(26, 'Doosan', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(27, 'HID', '1', b'1', b'0', b'0', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(28, 'Progessive', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(29, 'Zoller', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(31, 'MTI', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(32, 'Phoenix Inc', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
INSERT INTO `vendors` (`vendorid`, `vendor`, `isactive`, `isprinter`, `ispc`, `ismachine`, `isserver`, `isswitch`, `iscamera`) VALUES
|
|
(33, 'Ransohoff', '1', b'0', b'0', b'1', b'0', b'0', b'0');
|
|
|
|
-- Dumping structure for view shopdb.vw_active_pcs
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_active_pcs` (
|
|
`pcid` INT(11) NOT NULL,
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`serialnumber` VARCHAR(1) NULL COMMENT 'System serial number from BIOS' COLLATE 'utf8_general_ci',
|
|
`manufacturer` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`model` TINYTEXT NULL COLLATE 'utf8_general_ci',
|
|
`loggedinuser` VARCHAR(1) NULL COMMENT 'Currently logged in user' COLLATE 'utf8_general_ci',
|
|
`machinenumber` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci',
|
|
`operatingsystem` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`pctype` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`typedescription` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`warrantystatus` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`warrantyenddate` DATE NULL COMMENT 'Warranty expiration date',
|
|
`warrantydaysremaining` BIGINT(11) NULL,
|
|
`lastupdated` DATETIME NULL COMMENT 'Last update timestamp',
|
|
`daysold` INT(7) NULL
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_dnc_config
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_dnc_config` (
|
|
`Hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`PC_MachineNo` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci',
|
|
`DNC_MachineNo` VARCHAR(1) NULL COMMENT 'Machine number from DNC config' COLLATE 'utf8_general_ci',
|
|
`Site` VARCHAR(1) NULL COMMENT 'WestJefferson, etc.' COLLATE 'utf8_general_ci',
|
|
`CNC` VARCHAR(1) NULL COMMENT 'Fanuc 30, etc.' COLLATE 'utf8_general_ci',
|
|
`NcIF` VARCHAR(1) NULL COMMENT 'EFOCAS, etc.' COLLATE 'utf8_general_ci',
|
|
`HostType` VARCHAR(1) NULL COMMENT 'WILM, VMS, Windows' COLLATE 'utf8_general_ci',
|
|
`FtpHostPrimary` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`FtpHostSecondary` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`FtpAccount` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`Debug` VARCHAR(1) NULL COMMENT 'ON/OFF' COLLATE 'utf8_general_ci',
|
|
`Uploads` VARCHAR(1) NULL COMMENT 'YES/NO' COLLATE 'utf8_general_ci',
|
|
`Scanner` VARCHAR(1) NULL COMMENT 'YES/NO' COLLATE 'utf8_general_ci',
|
|
`Dripfeed` VARCHAR(1) NULL COMMENT 'YES/NO' COLLATE 'utf8_general_ci',
|
|
`AdditionalSettings` TEXT NULL COMMENT 'JSON of other DNC settings' COLLATE 'utf8_general_ci',
|
|
`DualPath_Enabled` TINYINT(1) NULL COMMENT 'Whether DualPath is enabled from eFocas registry',
|
|
`Path1_Name` VARCHAR(1) NULL COMMENT 'Path1Name from eFocas registry' COLLATE 'utf8_general_ci',
|
|
`Path2_Name` VARCHAR(1) NULL COMMENT 'Path2Name from eFocas registry' COLLATE 'utf8_general_ci',
|
|
`GE_Registry_32bit` TINYINT(1) NULL COMMENT 'DNC service found in 32-bit GE Aircraft Engines registry',
|
|
`GE_Registry_64bit` TINYINT(1) NULL COMMENT 'DNC service found in 64-bit GE Aircraft Engines registry (WOW6432Node)',
|
|
`GE_Registry_Notes` TEXT NULL COMMENT 'Additional GE registry configuration data for this DNC service (JSON)' COLLATE 'utf8_general_ci',
|
|
`LastUpdated` DATETIME NULL,
|
|
`PCID` INT(11) NOT NULL,
|
|
`DNCID` INT(11) NOT NULL
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_dualpath_management
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_dualpath_management` (
|
|
`pc_hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`pcid` INT(11) NOT NULL,
|
|
`pc_type` VARCHAR(1) NOT NULL COMMENT 'Type name (Standard, Engineer, Shopfloor, etc.)' COLLATE 'utf8_general_ci',
|
|
`primary_machine` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci',
|
|
`dualpath_enabled` TINYINT(1) NULL COMMENT 'Whether DualPath is enabled from eFocas registry',
|
|
`path1_name` VARCHAR(1) NULL COMMENT 'Path1Name from eFocas registry' COLLATE 'utf8_general_ci',
|
|
`path2_name` VARCHAR(1) NULL COMMENT 'Path2Name from eFocas registry' COLLATE 'utf8_general_ci',
|
|
`secondary_machine` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
|
|
`assignment_updated` TIMESTAMP NULL,
|
|
`primary_machine_alias` TINYTEXT NULL COMMENT 'Alternate Machine Name for dual Spindle\r\nHuman readable name for searching\r\n' COLLATE 'utf8_general_ci',
|
|
`secondary_machine_alias` TINYTEXT NULL COMMENT 'Alternate Machine Name for dual Spindle\r\nHuman readable name for searching\r\n' COLLATE 'utf8_general_ci',
|
|
`dualpath_status` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_engineer_pcs
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_engineer_pcs` (
|
|
`pcid` INT(11) NOT NULL,
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`serialnumber` VARCHAR(1) NULL COMMENT 'System serial number from BIOS' COLLATE 'utf8_general_ci',
|
|
`manufacturer` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`model` TINYTEXT NULL COLLATE 'utf8_general_ci',
|
|
`loggedinuser` VARCHAR(1) NULL COMMENT 'Currently logged in user' COLLATE 'utf8_general_ci',
|
|
`machinenumber` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci',
|
|
`operatingsystem` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`lastupdated` DATETIME NULL COMMENT 'Last update timestamp'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_ge_machines
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_ge_machines` (
|
|
`machinenumber` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci',
|
|
`pccount` BIGINT(21) NOT NULL,
|
|
`assignedpcs` TEXT NULL COLLATE 'utf8_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_idf_inventory
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_idf_inventory` (
|
|
`idfid` INT(11) NOT NULL,
|
|
`idfname` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
|
|
`description` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
|
|
`maptop` INT(11) NULL,
|
|
`mapleft` INT(11) NULL,
|
|
`camera_count` BIGINT(21) NOT NULL,
|
|
`isactive` BIT(1) NULL
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_infrastructure_summary
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_infrastructure_summary` (
|
|
`device_type` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
|
|
`total_count` BIGINT(21) NOT NULL,
|
|
`active_count` DECIMAL(23,0) NULL
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_machinetype_comparison
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_machinetype_comparison` (
|
|
`machineid` INT(11) NOT NULL,
|
|
`machinenumber` TINYTEXT NULL COMMENT 'May be 0 padded for sorting' COLLATE 'utf8_general_ci',
|
|
`modelnumber` TINYTEXT NOT NULL COLLATE 'utf8_general_ci',
|
|
`vendor` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`machine_type_id` INT(11) NOT NULL,
|
|
`machine_type_name` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`model_type_id` INT(11) NULL,
|
|
`model_type_name` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`status` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_machine_assignments
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_machine_assignments` (
|
|
`machineid` INT(11) NOT NULL,
|
|
`machinenumber` TINYTEXT NULL COLLATE 'utf8_general_ci',
|
|
`pcid` INT(11) NULL,
|
|
`hostname` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`assignment_type` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
|
|
`is_primary` BIGINT(20) NOT NULL,
|
|
`has_dualpath` BIGINT(20) NULL
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_machine_assignment_status
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_machine_assignment_status` (
|
|
`machineid` INT(11) NOT NULL,
|
|
`machinenumber` TINYTEXT NULL COMMENT 'May be 0 padded for sorting' COLLATE 'utf8_general_ci',
|
|
`alias` TINYTEXT NULL COMMENT 'Alternate Machine Name for dual Spindle\r\nHuman readable name for searching\r\n' COLLATE 'utf8_general_ci',
|
|
`machinetype` CHAR(50) NOT NULL COLLATE 'utf8_general_ci',
|
|
`machinedescription` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`assignment_status` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`pcid` INT(11) NULL,
|
|
`pc_type` VARCHAR(1) NULL COMMENT 'Type name (Standard, Engineer, Shopfloor, etc.)' COLLATE 'utf8_general_ci',
|
|
`pc_manufacturer` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`pc_last_updated` DATETIME NULL COMMENT 'Last update timestamp',
|
|
`has_dualpath` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
|
|
`path1_name` VARCHAR(1) NULL COMMENT 'Path1Name from eFocas registry' COLLATE 'utf8_general_ci',
|
|
`path2_name` VARCHAR(1) NULL COMMENT 'Path2Name from eFocas registry' COLLATE 'utf8_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_machine_type_stats
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_machine_type_stats` (
|
|
`machinetype` CHAR(50) NOT NULL COLLATE 'utf8_general_ci',
|
|
`machinedescription` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`total_machines` BIGINT(21) NOT NULL,
|
|
`machines_with_pcs` DECIMAL(23,0) NULL,
|
|
`machines_without_pcs` DECIMAL(23,0) NULL,
|
|
`assignment_percentage` DECIMAL(29,2) NULL,
|
|
`machine_assignments` TEXT NULL COLLATE 'utf8_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_multi_pc_machines
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_multi_pc_machines` (
|
|
`machinenumber` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci',
|
|
`pc_count` BIGINT(21) NOT NULL,
|
|
`hostnames` TEXT NULL COLLATE 'utf8_general_ci',
|
|
`pcids` TEXT NULL COLLATE 'utf8mb4_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_network_devices
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_network_devices`
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_pcs_by_hardware
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_pcs_by_hardware` (
|
|
`manufacturer` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`model` TINYTEXT NULL COLLATE 'utf8_general_ci',
|
|
`totalcount` BIGINT(21) NOT NULL,
|
|
`standardcount` DECIMAL(23,0) NULL,
|
|
`engineercount` DECIMAL(23,0) NULL,
|
|
`shopfloorcount` DECIMAL(23,0) NULL
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_pctype_config
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_pctype_config` (
|
|
`pctypeid` INT(11) NOT NULL,
|
|
`TypeName` VARCHAR(1) NOT NULL COMMENT 'Type name (Standard, Engineer, Shopfloor, etc.)' COLLATE 'utf8_general_ci',
|
|
`Description` VARCHAR(1) NULL COMMENT 'Description of this PC type' COLLATE 'utf8_general_ci',
|
|
`DisplayOrder` INT(11) NULL COMMENT 'Order for display in reports',
|
|
`Status` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_pc_network_summary
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_pc_network_summary` (
|
|
`Hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`SerialNumber` VARCHAR(1) NULL COMMENT 'System serial number from BIOS' COLLATE 'utf8_general_ci',
|
|
`PCType` VARCHAR(1) NULL COMMENT 'Type name (Standard, Engineer, Shopfloor, etc.)' COLLATE 'utf8_general_ci',
|
|
`InterfaceCount` BIGINT(21) NOT NULL,
|
|
`IPAddresses` TEXT NULL COLLATE 'utf8_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_pc_resolved_machines
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_pc_resolved_machines` (
|
|
`pcid` INT(11) NOT NULL,
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`registry_machinenumber` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci',
|
|
`override_machinenumber` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`resolved_machinenumber` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`machine_source` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci',
|
|
`shared_machine_count` BIGINT(21) NULL,
|
|
`requires_manual_machine_config` TINYINT(1) NULL COMMENT 'TRUE when this PC shares machine number with other PCs'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_pc_summary
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_pc_summary` (
|
|
`PCType` VARCHAR(1) NOT NULL COMMENT 'Type name (Standard, Engineer, Shopfloor, etc.)' COLLATE 'utf8_general_ci',
|
|
`Description` VARCHAR(1) NULL COMMENT 'Description of this PC type' COLLATE 'utf8_general_ci',
|
|
`Count` BIGINT(21) NOT NULL,
|
|
`Percentage` DECIMAL(26,2) NULL
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_recent_updates
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_recent_updates` (
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`serialnumber` VARCHAR(1) NULL COMMENT 'System serial number from BIOS' COLLATE 'utf8_general_ci',
|
|
`manufacturer` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`pctype` VARCHAR(1) NULL COMMENT 'Type name (Standard, Engineer, Shopfloor, etc.)' COLLATE 'utf8_general_ci',
|
|
`loggedinuser` VARCHAR(1) NULL COMMENT 'Currently logged in user' COLLATE 'utf8_general_ci',
|
|
`lastupdated` DATETIME NULL COMMENT 'Last update timestamp'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_shopfloor_applications_summary
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_shopfloor_applications_summary` (
|
|
`appname` CHAR(50) NOT NULL COLLATE 'utf8_general_ci',
|
|
`appdescription` CHAR(255) NULL COLLATE 'utf8_general_ci',
|
|
`machine_count` BIGINT(21) NOT NULL,
|
|
`pc_count` BIGINT(21) NOT NULL,
|
|
`machine_numbers` TEXT NULL COLLATE 'utf8_general_ci',
|
|
`pc_hostnames` TEXT NULL COLLATE 'utf8_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_shopfloor_comm_config
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_shopfloor_comm_config` (
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`machinenumber` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci',
|
|
`configtype` VARCHAR(1) NULL COMMENT 'Serial, Mark, PPDCS, eFocas, etc.' COLLATE 'utf8_general_ci',
|
|
`portid` VARCHAR(1) NULL COMMENT 'COM1, COM2, etc.' COLLATE 'utf8_general_ci',
|
|
`baud` INT(11) NULL COMMENT 'Baud rate',
|
|
`databits` INT(11) NULL COMMENT 'Data bits (7,8)',
|
|
`stopbits` VARCHAR(1) NULL COMMENT 'Stop bits (1,1.5,2)' COLLATE 'utf8_general_ci',
|
|
`parity` VARCHAR(1) NULL COMMENT 'None, Even, Odd' COLLATE 'utf8_general_ci',
|
|
`ipaddress` VARCHAR(1) NULL COMMENT 'For eFocas and network configs' COLLATE 'utf8_general_ci',
|
|
`socketnumber` INT(11) NULL COMMENT 'Socket number for network protocols'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_shopfloor_pcs
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_shopfloor_pcs` (
|
|
`pcid` INT(11) NOT NULL,
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`serialnumber` VARCHAR(1) NULL COMMENT 'System serial number from BIOS' COLLATE 'utf8_general_ci',
|
|
`manufacturer` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`model` TINYTEXT NULL COLLATE 'utf8_general_ci',
|
|
`loggedinuser` VARCHAR(1) NULL COMMENT 'Currently logged in user' COLLATE 'utf8_general_ci',
|
|
`machinenumber` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
|
|
`operatingsystem` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`lastupdated` DATETIME NULL COMMENT 'Last update timestamp'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_standard_pcs
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_standard_pcs` (
|
|
`pcid` INT(11) NOT NULL,
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`serialnumber` VARCHAR(1) NULL COMMENT 'System serial number from BIOS' COLLATE 'utf8_general_ci',
|
|
`manufacturer` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`model` TINYTEXT NULL COLLATE 'utf8_general_ci',
|
|
`loggedinuser` VARCHAR(1) NULL COMMENT 'Currently logged in user' COLLATE 'utf8_general_ci',
|
|
`operatingsystem` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`lastupdated` DATETIME NULL COMMENT 'Last update timestamp'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_unmapped_machines
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_unmapped_machines` (
|
|
`machineid` INT(11) NOT NULL,
|
|
`machinenumber` TINYTEXT NULL COMMENT 'May be 0 padded for sorting' COLLATE 'utf8_general_ci',
|
|
`alias` TINYTEXT NULL COMMENT 'Alternate Machine Name for dual Spindle\r\nHuman readable name for searching\r\n' COLLATE 'utf8_general_ci',
|
|
`ipaddress1` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`ipaddress2` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`machine_type` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`mapleft` SMALLINT(6) NULL,
|
|
`maptop` SMALLINT(6) NULL,
|
|
`isactive` INT(11) NULL,
|
|
`map_status` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_vendor_summary
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_vendor_summary` (
|
|
`manufacturer` CHAR(50) NULL COLLATE 'utf8_general_ci',
|
|
`totalpcs` BIGINT(21) NOT NULL,
|
|
`standardpcs` DECIMAL(23,0) NULL,
|
|
`engineerpcs` DECIMAL(23,0) NULL,
|
|
`shopfloorpcs` DECIMAL(23,0) NULL,
|
|
`lastseen` DATETIME NULL COMMENT 'Last update timestamp'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_warranties_expiring
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_warranties_expiring` (
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`serialnumber` VARCHAR(1) NULL COMMENT 'System serial number from BIOS' COLLATE 'utf8_general_ci',
|
|
`manufacturer` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`model` TINYTEXT NULL COLLATE 'utf8_general_ci',
|
|
`pctype` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`warrantyenddate` DATE NULL COMMENT 'Warranty expiration date',
|
|
`warrantydaysremaining` BIGINT(11) NULL,
|
|
`warrantyservicelevel` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`loggedinuser` VARCHAR(1) NULL COMMENT 'Currently logged in user' COLLATE 'utf8_general_ci',
|
|
`machinenumber` VARCHAR(1) NULL COMMENT 'GE Aircraft Engines Machine Number if available' COLLATE 'utf8_general_ci'
|
|
);
|
|
|
|
-- Dumping structure for view shopdb.vw_warranty_status
|
|
-- Creating temporary table to overcome VIEW dependency errors
|
|
CREATE TABLE `vw_warranty_status` (
|
|
`hostname` VARCHAR(1) NULL COMMENT 'Computer hostname' COLLATE 'utf8_general_ci',
|
|
`serialnumber` VARCHAR(1) NULL COMMENT 'System serial number from BIOS' COLLATE 'utf8_general_ci',
|
|
`manufacturer` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`model` TINYTEXT NULL COLLATE 'utf8_general_ci',
|
|
`pctype` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`warrantystatus` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`warrantyenddate` DATE NULL COMMENT 'Warranty expiration date',
|
|
`warrantydaysremaining` BIGINT(11) NULL,
|
|
`warrantyservicelevel` VARCHAR(1) NULL COLLATE 'utf8_general_ci',
|
|
`warrantylastchecked` DATETIME NULL COMMENT 'When warranty was last checked',
|
|
`warrantyalert` VARCHAR(1) NULL COLLATE 'utf8mb4_general_ci',
|
|
`lastupdated` DATETIME NULL COMMENT 'Last update timestamp'
|
|
);
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_active_pcs`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_active_pcs` AS select `p`.`pcid` AS `pcid`,`p`.`hostname` AS `hostname`,`p`.`serialnumber` AS `serialnumber`,coalesce(`v`.`vendor`,'Unknown') AS `manufacturer`,`m`.`modelnumber` AS `model`,`p`.`loggedinuser` AS `loggedinuser`,`p`.`machinenumber` AS `machinenumber`,coalesce(`os`.`operatingsystem`,'Unknown') AS `operatingsystem`,coalesce(`pt`.`typename`,'Unknown') AS `pctype`,coalesce(`pt`.`description`,'Unknown') AS `typedescription`,(case when (`p`.`warrantystatus` is not null) then `p`.`warrantystatus` when isnull(`p`.`warrantyenddate`) then 'Unknown' when (`p`.`warrantyenddate` < curdate()) then 'Expired' else 'Active' end) AS `warrantystatus`,`p`.`warrantyenddate` AS `warrantyenddate`,(case when (`p`.`warrantydaysremaining` is not null) then `p`.`warrantydaysremaining` when isnull(`p`.`warrantyenddate`) then NULL else (to_days(`p`.`warrantyenddate`) - to_days(curdate())) end) AS `warrantydaysremaining`,`p`.`lastupdated` AS `lastupdated`,(to_days(now()) - to_days(`p`.`lastupdated`)) AS `daysold` from ((((`pc` `p` left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) left join `operatingsystems` `os` on((`p`.`osid` = `os`.`osid`))) where (`p`.`lastupdated` > (now() - interval 30 day))
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_dnc_config`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_dnc_config` AS select `p`.`hostname` AS `Hostname`,`p`.`machinenumber` AS `PC_MachineNo`,`d`.`machinenumber` AS `DNC_MachineNo`,`d`.`site` AS `Site`,`d`.`cnc` AS `CNC`,`d`.`ncif` AS `NcIF`,`d`.`hosttype` AS `HostType`,`d`.`ftphostprimary` AS `FtpHostPrimary`,`d`.`ftphostsecondary` AS `FtpHostSecondary`,`d`.`ftpaccount` AS `FtpAccount`,`d`.`debug` AS `Debug`,`d`.`uploads` AS `Uploads`,`d`.`scanner` AS `Scanner`,`d`.`dripfeed` AS `Dripfeed`,`d`.`additionalsettings` AS `AdditionalSettings`,`d`.`dualpath_enabled` AS `DualPath_Enabled`,`d`.`path1_name` AS `Path1_Name`,`d`.`path2_name` AS `Path2_Name`,`d`.`ge_registry_32bit` AS `GE_Registry_32bit`,`d`.`ge_registry_64bit` AS `GE_Registry_64bit`,`d`.`ge_registry_notes` AS `GE_Registry_Notes`,`d`.`lastupdated` AS `LastUpdated`,`p`.`pcid` AS `PCID`,`d`.`dncid` AS `DNCID` from (`pc` `p` join `pc_dnc_config` `d` on((`p`.`pcid` = `d`.`pcid`))) order by `p`.`hostname`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_dualpath_management`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_dualpath_management` AS select `p`.`hostname` AS `pc_hostname`,`p`.`pcid` AS `pcid`,`pt`.`typename` AS `pc_type`,`p`.`machinenumber` AS `primary_machine`,`dc`.`dualpath_enabled` AS `dualpath_enabled`,`dc`.`path1_name` AS `path1_name`,`dc`.`path2_name` AS `path2_name`,`dpa`.`secondary_machine` AS `secondary_machine`,`dpa`.`lastupdated` AS `assignment_updated`,`m1`.`alias` AS `primary_machine_alias`,`m2`.`alias` AS `secondary_machine_alias`,(case when ((`dc`.`dualpath_enabled` = 1) and (`dpa`.`secondary_machine` is not null)) then 'Fully Configured' when ((`dc`.`dualpath_enabled` = 1) and isnull(`dpa`.`secondary_machine`)) then 'Enabled - No Assignment' when ((`dc`.`dualpath_enabled` = 0) and (`dpa`.`secondary_machine` is not null)) then 'Assignment Without Enable' else 'Not Configured' end) AS `dualpath_status` from (((((`pc` `p` join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) left join `pc_dnc_config` `dc` on((`p`.`pcid` = `dc`.`pcid`))) left join `pc_dualpath_assignments` `dpa` on((`p`.`pcid` = `dpa`.`pcid`))) left join `machines` `m1` on((`p`.`machinenumber` = `m1`.`machinenumber`))) left join `machines` `m2` on((`dpa`.`secondary_machine` = convert(`m2`.`machinenumber` using utf8mb4)))) where ((`p`.`isactive` = 1) and ((`dc`.`dualpath_enabled` = 1) or (`dpa`.`secondary_machine` is not null))) order by (case when ((`dc`.`dualpath_enabled` = 1) and (`dpa`.`secondary_machine` is not null)) then 'Fully Configured' when ((`dc`.`dualpath_enabled` = 1) and isnull(`dpa`.`secondary_machine`)) then 'Enabled - No Assignment' when ((`dc`.`dualpath_enabled` = 0) and (`dpa`.`secondary_machine` is not null)) then 'Assignment Without Enable' else 'Not Configured' end) desc,`p`.`hostname`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_engineer_pcs`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_engineer_pcs` AS select `p`.`pcid` AS `pcid`,`p`.`hostname` AS `hostname`,`p`.`serialnumber` AS `serialnumber`,`v`.`vendor` AS `manufacturer`,`m`.`modelnumber` AS `model`,`p`.`loggedinuser` AS `loggedinuser`,`p`.`machinenumber` AS `machinenumber`,coalesce(`os`.`operatingsystem`,'Unknown') AS `operatingsystem`,`p`.`lastupdated` AS `lastupdated` from ((((`pc` `p` left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `operatingsystems` `os` on((`p`.`osid` = `os`.`osid`))) join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where ((`pt`.`typename` = 'Engineer') and (`p`.`lastupdated` > (now() - interval 30 day))) order by `p`.`hostname`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_ge_machines`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_ge_machines` AS select `p`.`machinenumber` AS `machinenumber`,count(0) AS `pccount`,group_concat(concat(`p`.`hostname`,' (',`pt`.`typename`,'/',ifnull(`v`.`vendor`,'Unknown'),')') order by `p`.`hostname` ASC separator ', ') AS `assignedpcs` from (((`pc` `p` left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where ((`p`.`machinenumber` is not null) and (`p`.`machinenumber` <> '') and (`p`.`lastupdated` > (now() - interval 30 day))) group by `p`.`machinenumber` order by `p`.`machinenumber`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_idf_inventory`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_idf_inventory` AS select `i`.`idfid` AS `idfid`,`i`.`idfname` AS `idfname`,`i`.`description` AS `description`,`i`.`maptop` AS `maptop`,`i`.`mapleft` AS `mapleft`,count(distinct `cam`.`cameraid`) AS `camera_count`,`i`.`isactive` AS `isactive` from (`idfs` `i` left join `cameras` `cam` on(((`i`.`idfid` = `cam`.`idfid`) and (`cam`.`isactive` = 1)))) where (`i`.`isactive` = 1) group by `i`.`idfid`,`i`.`idfname`,`i`.`description`,`i`.`maptop`,`i`.`mapleft`,`i`.`isactive`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_infrastructure_summary`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_infrastructure_summary` AS select 'Switches' AS `device_type`,count(0) AS `total_count`,sum((case when (`switches`.`isactive` = 1) then 1 else 0 end)) AS `active_count` from `switches` union all select 'Access Points' AS `device_type`,count(0) AS `total_count`,sum((case when (`accesspoints`.`isactive` = 1) then 1 else 0 end)) AS `active_count` from `accesspoints` union all select 'Servers' AS `device_type`,count(0) AS `total_count`,sum((case when (`servers`.`isactive` = 1) then 1 else 0 end)) AS `active_count` from `servers` union all select 'Cameras' AS `device_type`,count(0) AS `total_count`,sum((case when (`cameras`.`isactive` = 1) then 1 else 0 end)) AS `active_count` from `cameras` union all select 'IDFs' AS `device_type`,count(0) AS `total_count`,sum((case when (`idfs`.`isactive` = 1) then 1 else 0 end)) AS `active_count` from `idfs`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_machinetype_comparison`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_machinetype_comparison` AS select `m`.`machineid` AS `machineid`,`m`.`machinenumber` AS `machinenumber`,`mo`.`modelnumber` AS `modelnumber`,`v`.`vendor` AS `vendor`,`m`.`machinetypeid` AS `machine_type_id`,`mt1`.`machinetype` AS `machine_type_name`,`mo`.`machinetypeid` AS `model_type_id`,`mt2`.`machinetype` AS `model_type_name`,(case when (`m`.`machinetypeid` = `mo`.`machinetypeid`) then 'MATCH' when ((`m`.`machinetypeid` = 1) and (`mo`.`machinetypeid` <> 1)) then 'MACHINE_WAS_PLACEHOLDER' when ((`m`.`machinetypeid` <> 1) and (`mo`.`machinetypeid` = 1)) then 'MODEL_IS_PLACEHOLDER' else 'MISMATCH' end) AS `status` from ((((`machines` `m` join `models` `mo` on((`m`.`modelnumberid` = `mo`.`modelnumberid`))) left join `machinetypes` `mt1` on((`m`.`machinetypeid` = `mt1`.`machinetypeid`))) left join `machinetypes` `mt2` on((`mo`.`machinetypeid` = `mt2`.`machinetypeid`))) left join `vendors` `v` on((`mo`.`vendorid` = `v`.`vendorid`))) where (`m`.`isactive` = 1) order by (case when (`m`.`machinetypeid` = `mo`.`machinetypeid`) then 1 else 0 end),`mo`.`modelnumber`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_machine_assignments`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_machine_assignments` AS select `m`.`machineid` AS `machineid`,`m`.`machinenumber` AS `machinenumber`,`p`.`pcid` AS `pcid`,`p`.`hostname` AS `hostname`,'Primary' AS `assignment_type`,1 AS `is_primary`,(case when (`dc`.`dualpath_enabled` = 1) then 1 else 0 end) AS `has_dualpath` from ((`machines` `m` left join `pc` `p` on((`m`.`machinenumber` = `p`.`machinenumber`))) left join `pc_dnc_config` `dc` on((`p`.`pcid` = `dc`.`pcid`))) union all select `m`.`machineid` AS `machineid`,`m`.`machinenumber` AS `machinenumber`,`p`.`pcid` AS `pcid`,`p`.`hostname` AS `hostname`,'DualPath' AS `assignment_type`,0 AS `is_primary`,1 AS `has_dualpath` from ((`machines` `m` join `pc_dualpath_assignments` `dpa` on((convert(`m`.`machinenumber` using utf8mb4) = `dpa`.`secondary_machine`))) join `pc` `p` on((`dpa`.`pcid` = `p`.`pcid`)))
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_machine_assignment_status`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_machine_assignment_status` AS select `m`.`machineid` AS `machineid`,`m`.`machinenumber` AS `machinenumber`,`m`.`alias` AS `alias`,`mt`.`machinetype` AS `machinetype`,`mt`.`machinedescription` AS `machinedescription`,(case when (`p`.`pcid` is not null) then 'Assigned' else 'Unassigned' end) AS `assignment_status`,`p`.`hostname` AS `hostname`,`p`.`pcid` AS `pcid`,`pt`.`typename` AS `pc_type`,`v`.`vendor` AS `pc_manufacturer`,`p`.`lastupdated` AS `pc_last_updated`,(case when (`dc`.`dualpath_enabled` = 1) then 'Yes' else 'No' end) AS `has_dualpath`,`dc`.`path1_name` AS `path1_name`,`dc`.`path2_name` AS `path2_name` from ((((((`machines` `m` join `machinetypes` `mt` on((`m`.`machinetypeid` = `mt`.`machinetypeid`))) left join `pc` `p` on(((`m`.`machinenumber` = `p`.`machinenumber`) and (`p`.`isactive` = 1)))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) left join `models` `mo` on((`p`.`modelnumberid` = `mo`.`modelnumberid`))) left join `vendors` `v` on((`mo`.`vendorid` = `v`.`vendorid`))) left join `pc_dnc_config` `dc` on((`p`.`pcid` = `dc`.`pcid`))) where (`m`.`isactive` = 1) order by `m`.`machinenumber`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_machine_type_stats`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_machine_type_stats` AS select `mt`.`machinetype` AS `machinetype`,`mt`.`machinedescription` AS `machinedescription`,count(0) AS `total_machines`,sum((case when (`p`.`pcid` is not null) then 1 else 0 end)) AS `machines_with_pcs`,sum((case when isnull(`p`.`pcid`) then 1 else 0 end)) AS `machines_without_pcs`,round(((sum((case when (`p`.`pcid` is not null) then 1 else 0 end)) * 100.0) / count(0)),2) AS `assignment_percentage`,group_concat(distinct concat(`m`.`machinenumber`,':',ifnull(`p`.`hostname`,'Unassigned')) order by `m`.`machinenumber` ASC separator ', ') AS `machine_assignments` from ((`machines` `m` join `machinetypes` `mt` on((`m`.`machinetypeid` = `mt`.`machinetypeid`))) left join `pc` `p` on(((`m`.`machinenumber` = `p`.`machinenumber`) and (`p`.`isactive` = 1)))) where (`m`.`isactive` = 1) group by `mt`.`machinetypeid`,`mt`.`machinetype`,`mt`.`machinedescription` order by `total_machines` desc
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_multi_pc_machines`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_multi_pc_machines` AS select `pc`.`machinenumber` AS `machinenumber`,count(0) AS `pc_count`,group_concat(distinct `pc`.`hostname` order by `pc`.`hostname` ASC separator ', ') AS `hostnames`,group_concat(distinct `pc`.`pcid` order by `pc`.`pcid` ASC separator ', ') AS `pcids` from `pc` where ((`pc`.`machinenumber` is not null) and (`pc`.`machinenumber` <> '') and (`pc`.`machinenumber` <> 'NULL')) group by `pc`.`machinenumber` having (count(0) > 1)
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_network_devices`;
|
|
CREATE VIEW `vw_network_devices` AS select 'IDF' AS `device_type`,`i`.`idfid` AS `device_id`,`i`.`idfname` AS `device_name`,NULL AS `modelid`,NULL AS `modelnumber`,NULL AS `vendor`,NULL AS `serialnumber`,NULL AS `ipaddress`,`i`.`description` AS `description`,`i`.`maptop` AS `maptop`,`i`.`mapleft` AS `mapleft`,`i`.`isactive` AS `isactive`,NULL AS `idfid`,NULL AS `idfname`,NULL AS `macaddress` from `shopdb`.`idfs` `i` union all select 'Server' AS `device_type`,`s`.`serverid` AS `device_id`,`s`.`servername` AS `device_name`,`s`.`modelid` AS `modelid`,`m`.`modelnumber` AS `modelnumber`,`v`.`vendor` AS `vendor`,`s`.`serialnumber` AS `serialnumber`,`s`.`ipaddress` AS `ipaddress`,`s`.`description` AS `description`,`s`.`maptop` AS `maptop`,`s`.`mapleft` AS `mapleft`,`s`.`isactive` AS `isactive`,NULL AS `idfid`,NULL AS `idfname`,NULL AS `macaddress` from ((`shopdb`.`servers` `s` left join `shopdb`.`models` `m` on((`s`.`modelid` = `m`.`modelnumberid`))) left join `shopdb`.`vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) union all select 'Switch' AS `device_type`,`sw`.`switchid` AS `device_id`,`sw`.`switchname` AS `device_name`,`sw`.`modelid` AS `modelid`,`m`.`modelnumber` AS `modelnumber`,`v`.`vendor` AS `vendor`,`sw`.`serialnumber` AS `serialnumber`,`sw`.`ipaddress` AS `ipaddress`,`sw`.`description` AS `description`,`sw`.`maptop` AS `maptop`,`sw`.`mapleft` AS `mapleft`,`sw`.`isactive` AS `isactive`,NULL AS `idfid`,NULL AS `idfname`,NULL AS `macaddress` from ((`shopdb`.`switches` `sw` left join `shopdb`.`models` `m` on((`sw`.`modelid` = `m`.`modelnumberid`))) left join `shopdb`.`vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) union all select 'Camera' AS `device_type`,`c`.`cameraid` AS `device_id`,`c`.`cameraname` AS `device_name`,`c`.`modelid` AS `modelid`,`m`.`modelnumber` AS `modelnumber`,`v`.`vendor` AS `vendor`,`c`.`serialnumber` AS `serialnumber`,`c`.`ipaddress` AS `ipaddress`,`c`.`description` AS `description`,`c`.`maptop` AS `maptop`,`c`.`mapleft` AS `mapleft`,`c`.`isactive` AS `isactive`,`c`.`idfid` AS `idfid`,`i`.`idfname` AS `idfname`,`c`.`macaddress` AS `macaddress` from (((`shopdb`.`cameras` `c` left join `shopdb`.`models` `m` on((`c`.`modelid` = `m`.`modelnumberid`))) left join `shopdb`.`vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `shopdb`.`idfs` `i` on((`c`.`idfid` = `i`.`idfid`))) union all select 'Access Point' AS `device_type`,`a`.`apid` AS `device_id`,`a`.`apname` AS `device_name`,`a`.`modelid` AS `modelid`,`m`.`modelnumber` AS `modelnumber`,`v`.`vendor` AS `vendor`,`a`.`serialnumber` AS `serialnumber`,`a`.`ipaddress` AS `ipaddress`,`a`.`description` AS `description`,`a`.`maptop` AS `maptop`,`a`.`mapleft` AS `mapleft`,`a`.`isactive` AS `isactive`,NULL AS `idfid`,NULL AS `idfname`,NULL AS `macaddress` from ((`shopdb`.`accesspoints` `a` left join `shopdb`.`models` `m` on((`a`.`modelid` = `m`.`modelnumberid`))) left join `shopdb`.`vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) union all select 'Printer' AS `device_type`,`p`.`printerid` AS `device_id`,`p`.`printerwindowsname` AS `device_name`,`p`.`modelid` AS `modelid`,`m`.`modelnumber` AS `modelnumber`,`v`.`vendor` AS `vendor`,`p`.`serialnumber` AS `serialnumber`,`p`.`ipaddress` AS `ipaddress`,NULL AS `description`,`p`.`maptop` AS `maptop`,`p`.`mapleft` AS `mapleft`,`p`.`isactive` AS `isactive`,NULL AS `idfid`,NULL AS `idfname`,NULL AS `macaddress` from ((`shopdb`.`printers` `p` left join `shopdb`.`models` `m` on((`p`.`modelid` = `m`.`modelnumberid`))) left join `shopdb`.`vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`)))
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_pcs_by_hardware`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_pcs_by_hardware` AS select `v`.`vendor` AS `manufacturer`,`m`.`modelnumber` AS `model`,count(0) AS `totalcount`,sum((case when (`pt`.`typename` = 'Standard') then 1 else 0 end)) AS `standardcount`,sum((case when (`pt`.`typename` = 'Engineer') then 1 else 0 end)) AS `engineercount`,sum((case when (`pt`.`typename` = 'Shopfloor') then 1 else 0 end)) AS `shopfloorcount` from (((`pc` `p` left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where (`p`.`lastupdated` > (now() - interval 30 day)) group by `v`.`vendor`,`m`.`modelnumber` order by `totalcount` desc
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_pctype_config`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_pctype_config` AS select `pctype`.`pctypeid` AS `pctypeid`,`pctype`.`typename` AS `TypeName`,`pctype`.`description` AS `Description`,`pctype`.`displayorder` AS `DisplayOrder`,(case `pctype`.`isactive` when '1' then 'Active' else 'Inactive' end) AS `Status` from `pctype` order by `pctype`.`displayorder`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_pc_network_summary`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_pc_network_summary` AS select `p`.`hostname` AS `Hostname`,`p`.`serialnumber` AS `SerialNumber`,`pt`.`typename` AS `PCType`,count(distinct `ni`.`interfaceid`) AS `InterfaceCount`,group_concat(concat(`ni`.`ipaddress`,convert((case when (`ni`.`ismachinenetwork` = 1) then ' (Machine)' else ' (Network)' end) using utf8)) separator ', ') AS `IPAddresses` from ((`pc` `p` left join `pc_network_interfaces` `ni` on(((`p`.`pcid` = `ni`.`pcid`) and (`ni`.`isactive` = 1)))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where (`p`.`lastupdated` > (now() - interval 30 day)) group by `p`.`pcid`,`p`.`hostname`,`p`.`serialnumber`,`pt`.`typename` having (`InterfaceCount` > 0) order by `InterfaceCount` desc,`p`.`hostname`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_pc_resolved_machines`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_pc_resolved_machines` AS select `p`.`pcid` AS `pcid`,`p`.`hostname` AS `hostname`,`p`.`machinenumber` AS `registry_machinenumber`,`mo`.`machinenumber` AS `override_machinenumber`,coalesce(`mo`.`machinenumber`,`p`.`machinenumber`) AS `resolved_machinenumber`,(case when (`mo`.`machinenumber` is not null) then 'override' else 'registry' end) AS `machine_source`,`mpm`.`pc_count` AS `shared_machine_count`,`p`.`requires_manual_machine_config` AS `requires_manual_machine_config` from ((`pc` `p` left join `machine_overrides` `mo` on((`p`.`pcid` = `mo`.`pcid`))) left join `vw_multi_pc_machines` `mpm` on((`p`.`machinenumber` = `mpm`.`machinenumber`)))
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_pc_summary`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_pc_summary` AS select `pt`.`typename` AS `PCType`,`pt`.`description` AS `Description`,count(`p`.`pcid`) AS `Count`,round(((count(`p`.`pcid`) * 100.0) / nullif((select count(0) from `pc` where (`pc`.`lastupdated` > (now() - interval 30 day))),0)),2) AS `Percentage` from (`pctype` `pt` left join `pc` `p` on(((`pt`.`pctypeid` = `p`.`pctypeid`) and (`p`.`lastupdated` > (now() - interval 30 day))))) where (`pt`.`isactive` = '1') group by `pt`.`pctypeid`,`pt`.`typename`,`pt`.`description`,`pt`.`displayorder` order by `pt`.`displayorder`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_recent_updates`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_recent_updates` AS select `p`.`hostname` AS `hostname`,`p`.`serialnumber` AS `serialnumber`,`v`.`vendor` AS `manufacturer`,`pt`.`typename` AS `pctype`,`p`.`loggedinuser` AS `loggedinuser`,`p`.`lastupdated` AS `lastupdated` from (((`pc` `p` left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where (`p`.`lastupdated` > (now() - interval 30 day)) order by `p`.`lastupdated` desc limit 50
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_shopfloor_applications_summary`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_shopfloor_applications_summary` AS select `a`.`appname` AS `appname`,`a`.`appdescription` AS `appdescription`,count(distinct `ia`.`machineid`) AS `machine_count`,count(distinct `p`.`pcid`) AS `pc_count`,group_concat(distinct `m`.`machinenumber` order by `m`.`machinenumber` ASC separator ', ') AS `machine_numbers`,group_concat(distinct `p`.`hostname` order by `p`.`hostname` ASC separator ', ') AS `pc_hostnames` from (((`installedapps` `ia` join `applications` `a` on((`ia`.`appid` = `a`.`appid`))) join `machines` `m` on((`ia`.`machineid` = `m`.`machineid`))) left join `pc` `p` on(((`m`.`machinenumber` = `p`.`machinenumber`) and (`p`.`isactive` = 1)))) where ((`a`.`appid` in (2,4)) and (`m`.`isactive` = 1)) group by `a`.`appid`,`a`.`appname`,`a`.`appdescription` order by `machine_count` desc
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_shopfloor_comm_config`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_shopfloor_comm_config` AS select `p`.`hostname` AS `hostname`,`p`.`machinenumber` AS `machinenumber`,`cc`.`configtype` AS `configtype`,`cc`.`portid` AS `portid`,`cc`.`baud` AS `baud`,`cc`.`databits` AS `databits`,`cc`.`stopbits` AS `stopbits`,`cc`.`parity` AS `parity`,`cc`.`ipaddress` AS `ipaddress`,`cc`.`socketnumber` AS `socketnumber` from ((`pc` `p` join `pc_comm_config` `cc` on((`p`.`pcid` = `cc`.`pcid`))) join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where (`pt`.`typename` = 'Shopfloor') order by `p`.`hostname`,`cc`.`configtype`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_shopfloor_pcs`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_shopfloor_pcs` AS select `p`.`pcid` AS `pcid`,`p`.`hostname` AS `hostname`,`p`.`serialnumber` AS `serialnumber`,`v`.`vendor` AS `manufacturer`,`m`.`modelnumber` AS `model`,`p`.`loggedinuser` AS `loggedinuser`,coalesce(convert(`mo`.`machinenumber` using utf8mb4),convert(`p`.`machinenumber` using utf8mb4)) AS `machinenumber`,coalesce(`os`.`operatingsystem`,'Unknown') AS `operatingsystem`,`p`.`lastupdated` AS `lastupdated` from (((((`pc` `p` left join `machine_overrides` `mo` on((`p`.`pcid` = `mo`.`pcid`))) left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `operatingsystems` `os` on((`p`.`osid` = `os`.`osid`))) join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where ((`pt`.`typename` = 'Shopfloor') and (`p`.`lastupdated` > (now() - interval 30 day))) order by coalesce(convert(`mo`.`machinenumber` using utf8mb4),convert(`p`.`machinenumber` using utf8mb4)),`p`.`hostname`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_standard_pcs`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_standard_pcs` AS select `p`.`pcid` AS `pcid`,`p`.`hostname` AS `hostname`,`p`.`serialnumber` AS `serialnumber`,`v`.`vendor` AS `manufacturer`,`m`.`modelnumber` AS `model`,`p`.`loggedinuser` AS `loggedinuser`,coalesce(`os`.`operatingsystem`,'Unknown') AS `operatingsystem`,`p`.`lastupdated` AS `lastupdated` from ((((`pc` `p` left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `operatingsystems` `os` on((`p`.`osid` = `os`.`osid`))) join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where ((`pt`.`typename` = 'Standard') and (`p`.`lastupdated` > (now() - interval 30 day))) order by `p`.`hostname`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_unmapped_machines`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_unmapped_machines` AS select `m`.`machineid` AS `machineid`,`m`.`machinenumber` AS `machinenumber`,`m`.`alias` AS `alias`,`m`.`ipaddress1` AS `ipaddress1`,`m`.`ipaddress2` AS `ipaddress2`,`mt`.`machinetype` AS `machine_type`,`m`.`mapleft` AS `mapleft`,`m`.`maptop` AS `maptop`,`m`.`isactive` AS `isactive`,(case when (isnull(`m`.`mapleft`) and isnull(`m`.`maptop`)) then 'No coordinates' when isnull(`m`.`mapleft`) then 'Missing left coordinate' when isnull(`m`.`maptop`) then 'Missing top coordinate' else 'Mapped' end) AS `map_status` from (`machines` `m` left join `machinetypes` `mt` on((`m`.`machinetypeid` = `mt`.`machinetypeid`))) where ((isnull(`m`.`mapleft`) or isnull(`m`.`maptop`)) and (`m`.`isactive` = 1)) order by `m`.`machinenumber`
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_vendor_summary`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_vendor_summary` AS select `v`.`vendor` AS `manufacturer`,count(`p`.`pcid`) AS `totalpcs`,sum((case when (`pt`.`typename` = 'Standard') then 1 else 0 end)) AS `standardpcs`,sum((case when (`pt`.`typename` = 'Engineer') then 1 else 0 end)) AS `engineerpcs`,sum((case when (`pt`.`typename` = 'Shopfloor') then 1 else 0 end)) AS `shopfloorpcs`,max(`p`.`lastupdated`) AS `lastseen` from (((`vendors` `v` left join `models` `m` on((`v`.`vendorid` = `m`.`vendorid`))) left join `pc` `p` on(((`m`.`modelnumberid` = `p`.`modelnumberid`) and (`p`.`lastupdated` > (now() - interval 30 day))))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where (`v`.`isactive` = '1') group by `v`.`vendorid`,`v`.`vendor` having (count(`p`.`pcid`) > 0) order by `totalpcs` desc
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_warranties_expiring`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_warranties_expiring` AS select `p`.`hostname` AS `hostname`,`p`.`serialnumber` AS `serialnumber`,coalesce(`v`.`vendor`,'Unknown') AS `manufacturer`,`m`.`modelnumber` AS `model`,coalesce(`pt`.`typename`,'Unknown') AS `pctype`,`p`.`warrantyenddate` AS `warrantyenddate`,(case when (`p`.`warrantydaysremaining` is not null) then `p`.`warrantydaysremaining` when isnull(`p`.`warrantyenddate`) then NULL else (to_days(`p`.`warrantyenddate`) - to_days(curdate())) end) AS `warrantydaysremaining`,coalesce(`p`.`warrantyservicelevel`,'Unknown') AS `warrantyservicelevel`,`p`.`loggedinuser` AS `loggedinuser`,`p`.`machinenumber` AS `machinenumber` from (((`pc` `p` left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where ((`p`.`lastupdated` > (now() - interval 30 day)) and (((`p`.`warrantydaysremaining` is not null) and (`p`.`warrantydaysremaining` between 0 and 90)) or (isnull(`p`.`warrantydaysremaining`) and (`p`.`warrantyenddate` is not null) and (`p`.`warrantyenddate` between curdate() and (curdate() + interval 90 day))))) order by (case when (`p`.`warrantydaysremaining` is not null) then `p`.`warrantydaysremaining` when isnull(`p`.`warrantyenddate`) then 9999 else (to_days(`p`.`warrantyenddate`) - to_days(curdate())) end)
|
|
;
|
|
|
|
-- Removing temporary table and create final VIEW structure
|
|
DROP TABLE IF EXISTS `vw_warranty_status`;
|
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `vw_warranty_status` AS select `p`.`hostname` AS `hostname`,`p`.`serialnumber` AS `serialnumber`,coalesce(`v`.`vendor`,'Unknown') AS `manufacturer`,`m`.`modelnumber` AS `model`,coalesce(`pt`.`typename`,'Unknown') AS `pctype`,(case when (`p`.`warrantystatus` is not null) then `p`.`warrantystatus` when isnull(`p`.`warrantyenddate`) then 'Unknown' when (`p`.`warrantyenddate` < curdate()) then 'Expired' when (`p`.`warrantyenddate` between curdate() and (curdate() + interval 90 day)) then 'Expiring Soon' else 'Active' end) AS `warrantystatus`,`p`.`warrantyenddate` AS `warrantyenddate`,(case when (`p`.`warrantydaysremaining` is not null) then `p`.`warrantydaysremaining` when isnull(`p`.`warrantyenddate`) then NULL else (to_days(`p`.`warrantyenddate`) - to_days(curdate())) end) AS `warrantydaysremaining`,coalesce(`p`.`warrantyservicelevel`,'Unknown') AS `warrantyservicelevel`,`p`.`warrantylastchecked` AS `warrantylastchecked`,(case when isnull(`p`.`warrantyenddate`) then 'Unknown' when (`p`.`warrantyenddate` < curdate()) then 'Expired' when ((to_days(`p`.`warrantyenddate`) - to_days(curdate())) < 30) then 'Expiring Soon' when ((to_days(`p`.`warrantyenddate`) - to_days(curdate())) < 90) then 'Warning' else 'OK' end) AS `warrantyalert`,`p`.`lastupdated` AS `lastupdated` from (((`pc` `p` left join `models` `m` on((`p`.`modelnumberid` = `m`.`modelnumberid`))) left join `vendors` `v` on((`m`.`vendorid` = `v`.`vendorid`))) left join `pctype` `pt` on((`p`.`pctypeid` = `pt`.`pctypeid`))) where (`p`.`lastupdated` > (now() - interval 30 day)) order by (case when (`p`.`warrantydaysremaining` is not null) then `p`.`warrantydaysremaining` when isnull(`p`.`warrantyenddate`) then 9999 else (to_days(`p`.`warrantyenddate`) - to_days(curdate())) end)
|
|
;
|
|
|
|
/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
|
|
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
|
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
|
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
|