Add USB checkout system and SSO profile page
New Features: - USB Device checkout/check-in system with barcode scanning - displayusb.asp: List all USB devices with status - addusb.asp: Add new USB devices via barcode scan - checkout_usb.asp/savecheckout_usb.asp: Check out USB to SSO - checkin_usb.asp/savecheckin_usb.asp: Check in with wipe confirmation - usb_history.asp: Full checkout history with filters - api_usb.asp: JSON API for AJAX lookups - displayprofile.asp: SSO profile page showing user info and USB history - Date/time format changed to 12-hour (MM/DD/YYYY h:mm AM/PM) - SSO links in USB history now link to profile page via search Database: - New machinetypeid 44 for USB devices - New usb_checkouts table for tracking checkouts Cleanup: - Removed v2 folder (duplicate/old files) - Removed old debug/test files - Removed completed migration documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
15
sql/add_iswinrm_column.sql
Normal file
15
sql/add_iswinrm_column.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- ============================================================================
|
||||
-- FILE: add_iswinrm_column.sql
|
||||
-- PURPOSE: Add iswinrm column to machines table for tracking WinRM status
|
||||
-- DATE: 2025-12-05
|
||||
--
|
||||
-- USAGE: Run this on production database
|
||||
-- mysql -u root -p shopdb < add_iswinrm_column.sql
|
||||
-- ============================================================================
|
||||
|
||||
-- Add iswinrm column after isvnc
|
||||
ALTER TABLE machines ADD COLUMN iswinrm BIT(1) NULL DEFAULT b'0' AFTER isvnc;
|
||||
|
||||
-- Verify the column was added
|
||||
SELECT 'iswinrm column added successfully' AS status;
|
||||
SHOW COLUMNS FROM machines WHERE Field IN ('isvnc', 'iswinrm');
|
||||
40
sql/add_new_apps_2025-12-05.sql
Normal file
40
sql/add_new_apps_2025-12-05.sql
Normal file
@@ -0,0 +1,40 @@
|
||||
-- ============================================================================
|
||||
-- FILE: add_new_apps_2025-12-05.sql
|
||||
-- PURPOSE: Add new applications for production deployment
|
||||
-- DATE: 2025-12-05
|
||||
--
|
||||
-- USAGE: Run this on production database
|
||||
-- mysql -u root -p shopdb < add_new_apps_2025-12-05.sql
|
||||
-- ============================================================================
|
||||
|
||||
-- Add Keyence VR Series application
|
||||
INSERT INTO applications (appid, appname, isactive) VALUES
|
||||
(69, 'Keyence VR Series', 1);
|
||||
|
||||
-- Add Genspect application
|
||||
INSERT INTO applications (appid, appname, isactive) VALUES
|
||||
(70, 'Genspect', 1);
|
||||
|
||||
-- Add GageCal application (EAS1000 gage calibration)
|
||||
INSERT INTO applications (appid, appname, isactive) VALUES
|
||||
(71, 'GageCal', 1);
|
||||
|
||||
-- Add NI Software application (National Instruments)
|
||||
INSERT INTO applications (appid, appname, isactive) VALUES
|
||||
(72, 'NI Software', 1);
|
||||
|
||||
-- Add goCMM application (CMM companion software)
|
||||
INSERT INTO applications (appid, appname, isactive) VALUES
|
||||
(73, 'goCMM', 1);
|
||||
|
||||
-- Add DODA application (Dovetail Digital Analysis - CMM)
|
||||
INSERT INTO applications (appid, appname, isactive) VALUES
|
||||
(74, 'DODA', 1);
|
||||
|
||||
-- Add FormStatusMonitor application (Wax Trace companion)
|
||||
INSERT INTO applications (appid, appname, isactive) VALUES
|
||||
(75, 'FormStatusMonitor', 1);
|
||||
|
||||
-- Verify additions
|
||||
SELECT 'Applications added:' AS status;
|
||||
SELECT appid, appname, isactive FROM applications WHERE appid IN (69, 70, 71, 72, 73, 74, 75);
|
||||
@@ -1,62 +0,0 @@
|
||||
-- Assign Random Map Coordinates to Network Devices
|
||||
-- Date: 2025-11-13
|
||||
-- Purpose: Give map positions to network devices that don't have coordinates yet
|
||||
-- Range: mapleft (500-1000), maptop (500-1000)
|
||||
|
||||
USE shopdb;
|
||||
|
||||
-- Update servers without map coordinates
|
||||
UPDATE servers
|
||||
SET
|
||||
mapleft = FLOOR(500 + (RAND() * 500)),
|
||||
maptop = FLOOR(500 + (RAND() * 500))
|
||||
WHERE mapleft IS NULL OR maptop IS NULL;
|
||||
|
||||
-- Update switches without map coordinates
|
||||
UPDATE switches
|
||||
SET
|
||||
mapleft = FLOOR(500 + (RAND() * 500)),
|
||||
maptop = FLOOR(500 + (RAND() * 500))
|
||||
WHERE mapleft IS NULL OR maptop IS NULL;
|
||||
|
||||
-- Update cameras without map coordinates
|
||||
UPDATE cameras
|
||||
SET
|
||||
mapleft = FLOOR(500 + (RAND() * 500)),
|
||||
maptop = FLOOR(500 + (RAND() * 500))
|
||||
WHERE mapleft IS NULL OR maptop IS NULL;
|
||||
|
||||
-- Update access points without map coordinates
|
||||
UPDATE accesspoints
|
||||
SET
|
||||
mapleft = FLOOR(500 + (RAND() * 500)),
|
||||
maptop = FLOOR(500 + (RAND() * 500))
|
||||
WHERE mapleft IS NULL OR maptop IS NULL;
|
||||
|
||||
-- Update IDFs without map coordinates
|
||||
UPDATE idfs
|
||||
SET
|
||||
mapleft = FLOOR(500 + (RAND() * 500)),
|
||||
maptop = FLOOR(500 + (RAND() * 500))
|
||||
WHERE mapleft IS NULL OR maptop IS NULL;
|
||||
|
||||
-- Show results
|
||||
SELECT 'Servers' AS device_type, COUNT(*) AS total,
|
||||
SUM(CASE WHEN mapleft IS NOT NULL AND maptop IS NOT NULL THEN 1 ELSE 0 END) AS with_coordinates
|
||||
FROM servers
|
||||
UNION ALL
|
||||
SELECT 'Switches', COUNT(*),
|
||||
SUM(CASE WHEN mapleft IS NOT NULL AND maptop IS NOT NULL THEN 1 ELSE 0 END)
|
||||
FROM switches
|
||||
UNION ALL
|
||||
SELECT 'Cameras', COUNT(*),
|
||||
SUM(CASE WHEN mapleft IS NOT NULL AND maptop IS NOT NULL THEN 1 ELSE 0 END)
|
||||
FROM cameras
|
||||
UNION ALL
|
||||
SELECT 'Access Points', COUNT(*),
|
||||
SUM(CASE WHEN mapleft IS NOT NULL AND maptop IS NOT NULL THEN 1 ELSE 0 END)
|
||||
FROM accesspoints
|
||||
UNION ALL
|
||||
SELECT 'IDFs', COUNT(*),
|
||||
SUM(CASE WHEN mapleft IS NOT NULL AND maptop IS NOT NULL THEN 1 ELSE 0 END)
|
||||
FROM idfs;
|
||||
@@ -1,93 +0,0 @@
|
||||
-- =============================================================================
|
||||
-- Migration: Move Compliance Columns from machines to compliance Table
|
||||
-- Date: 2025-11-14
|
||||
-- Purpose: Consolidate compliance-related data into dedicated compliance table
|
||||
-- =============================================================================
|
||||
|
||||
-- STEP 1: Add missing compliance columns to compliance table
|
||||
-- Note: gecoreload already exists in compliance table (172 records populated)
|
||||
-- MySQL 5.6 compatible (no IF NOT EXISTS support)
|
||||
|
||||
-- Add systemname column
|
||||
ALTER TABLE compliance ADD COLUMN systemname TEXT NULL COMMENT 'System name for compliance tracking';
|
||||
|
||||
-- Add devicedescription column
|
||||
ALTER TABLE compliance ADD COLUMN devicedescription VARCHAR(1000) NULL COMMENT 'Device description';
|
||||
|
||||
-- Add on_ge_network column
|
||||
ALTER TABLE compliance ADD COLUMN on_ge_network ENUM('Yes','No','N/A') NULL COMMENT 'Whether device is on GE network';
|
||||
|
||||
-- Add asset_criticality column
|
||||
ALTER TABLE compliance ADD COLUMN asset_criticality ENUM('High','Medium','Low','N/A') NULL COMMENT 'Asset criticality level';
|
||||
|
||||
-- Add jump_box column
|
||||
ALTER TABLE compliance ADD COLUMN jump_box ENUM('Yes','No','N/A') NULL COMMENT 'Whether device is a jump box';
|
||||
|
||||
-- Add mft column
|
||||
ALTER TABLE compliance ADD COLUMN mft ENUM('Yes','No','N/A') NULL COMMENT 'Managed File Transfer status';
|
||||
|
||||
-- STEP 2: Migrate any existing data from machines to compliance
|
||||
-- (Current analysis shows 0 records with data in these columns, but script handles it anyway)
|
||||
|
||||
INSERT INTO compliance (machineid, systemname, devicedescription, on_ge_network, asset_criticality, jump_box, mft, gecoreload)
|
||||
SELECT
|
||||
m.machineid,
|
||||
m.systemname,
|
||||
m.devicedescription,
|
||||
m.on_ge_network,
|
||||
m.asset_criticality,
|
||||
m.jump_box,
|
||||
m.mft,
|
||||
m.gecoreload
|
||||
FROM machines m
|
||||
WHERE (
|
||||
m.systemname IS NOT NULL OR
|
||||
m.devicedescription IS NOT NULL OR
|
||||
m.on_ge_network IS NOT NULL OR
|
||||
m.asset_criticality IS NOT NULL OR
|
||||
m.jump_box IS NOT NULL OR
|
||||
m.mft IS NOT NULL OR
|
||||
m.gecoreload IS NOT NULL
|
||||
)
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM compliance c WHERE c.machineid = m.machineid
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
systemname = COALESCE(VALUES(systemname), compliance.systemname),
|
||||
devicedescription = COALESCE(VALUES(devicedescription), compliance.devicedescription),
|
||||
on_ge_network = COALESCE(VALUES(on_ge_network), compliance.on_ge_network),
|
||||
asset_criticality = COALESCE(VALUES(asset_criticality), compliance.asset_criticality),
|
||||
jump_box = COALESCE(VALUES(jump_box), compliance.jump_box),
|
||||
mft = COALESCE(VALUES(mft), compliance.mft),
|
||||
gecoreload = COALESCE(VALUES(gecoreload), compliance.gecoreload);
|
||||
|
||||
-- STEP 3: Drop compliance columns from machines table
|
||||
-- These belong in the compliance table, not the machines table
|
||||
-- MySQL 5.6 compatible (separate statements)
|
||||
|
||||
ALTER TABLE machines DROP COLUMN systemname;
|
||||
ALTER TABLE machines DROP COLUMN devicedescription;
|
||||
ALTER TABLE machines DROP COLUMN on_ge_network;
|
||||
ALTER TABLE machines DROP COLUMN asset_criticality;
|
||||
ALTER TABLE machines DROP COLUMN jump_box;
|
||||
ALTER TABLE machines DROP COLUMN mft;
|
||||
ALTER TABLE machines DROP COLUMN gecoreload;
|
||||
|
||||
-- =============================================================================
|
||||
-- Verification Queries
|
||||
-- =============================================================================
|
||||
|
||||
-- Check compliance table structure
|
||||
-- SHOW COLUMNS FROM compliance;
|
||||
|
||||
-- Check machines table no longer has these columns
|
||||
-- SHOW COLUMNS FROM machines WHERE Field IN ('systemname','devicedescription','on_ge_network','asset_criticality','jump_box','mft','gecoreload');
|
||||
|
||||
-- Check data migrated successfully
|
||||
-- SELECT COUNT(*) as compliance_records FROM compliance WHERE systemname IS NOT NULL OR devicedescription IS NOT NULL;
|
||||
|
||||
-- =============================================================================
|
||||
-- Status: Ready to execute
|
||||
-- Impact: Low - No ASP pages reference these columns, all data already in compliance table
|
||||
-- Tested: No
|
||||
-- =============================================================================
|
||||
@@ -1,247 +0,0 @@
|
||||
-- =====================================================
|
||||
-- CLEANUP: Consolidate Duplicate Vendors and Models
|
||||
-- =====================================================
|
||||
-- Purpose: Remove duplicate vendors/models caused by case/spacing differences
|
||||
-- WARNING: This will modify data. BACKUP FIRST!
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
SET SQL_SAFE_UPDATES = 0;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 1: Show Duplicate Vendors
|
||||
-- =====================================================
|
||||
|
||||
SELECT '============================================' AS '';
|
||||
SELECT 'STEP 1: Analyzing Duplicate Vendors' AS '';
|
||||
SELECT '============================================' AS '';
|
||||
|
||||
SELECT
|
||||
LOWER(TRIM(vendor)) as normalized_name,
|
||||
COUNT(*) as duplicate_count,
|
||||
GROUP_CONCAT(vendor ORDER BY vendorid SEPARATOR ' | ') as variations,
|
||||
GROUP_CONCAT(vendorid ORDER BY vendorid) as vendor_ids
|
||||
FROM vendors
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(vendor))
|
||||
HAVING COUNT(*) > 1
|
||||
ORDER BY duplicate_count DESC, normalized_name;
|
||||
|
||||
-- Count machines affected
|
||||
SELECT
|
||||
'Machines using duplicate vendors:' as status,
|
||||
COUNT(DISTINCT m.machineid) as machine_count
|
||||
FROM machines m
|
||||
JOIN models mo ON m.modelnumberid = mo.modelnumberid
|
||||
JOIN vendors v ON mo.vendorid = v.vendorid
|
||||
WHERE v.vendorid IN (
|
||||
SELECT vendorid FROM vendors v2
|
||||
WHERE LOWER(TRIM(v2.vendor)) IN (
|
||||
SELECT LOWER(TRIM(vendor))
|
||||
FROM vendors
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(vendor))
|
||||
HAVING COUNT(*) > 1
|
||||
)
|
||||
);
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 2: Show Duplicate Models
|
||||
-- =====================================================
|
||||
|
||||
SELECT '============================================' AS '';
|
||||
SELECT 'STEP 2: Analyzing Duplicate Models' AS '';
|
||||
SELECT '============================================' AS '';
|
||||
|
||||
SELECT
|
||||
REPLACE(REPLACE(REPLACE(LOWER(TRIM(modelnumber)), ' ', ''), '-', ''), '_', '') as normalized_model,
|
||||
v.vendor,
|
||||
COUNT(*) as duplicate_count,
|
||||
GROUP_CONCAT(modelnumber ORDER BY modelnumberid SEPARATOR ' | ') as variations,
|
||||
GROUP_CONCAT(modelnumberid ORDER BY modelnumberid) as model_ids
|
||||
FROM models m
|
||||
JOIN vendors v ON m.vendorid = v.vendorid
|
||||
WHERE m.isactive = 1
|
||||
GROUP BY REPLACE(REPLACE(REPLACE(LOWER(TRIM(modelnumber)), ' ', ''), '-', ''), '_', ''), m.vendorid
|
||||
HAVING COUNT(*) > 1
|
||||
ORDER BY duplicate_count DESC, normalized_model;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 3: Consolidate Duplicate Vendors (DRY RUN)
|
||||
-- =====================================================
|
||||
|
||||
SELECT '============================================' AS '';
|
||||
SELECT 'STEP 3: Vendor Consolidation Plan' AS '';
|
||||
SELECT '============================================' AS '';
|
||||
|
||||
-- This shows what WOULD be updated (DRY RUN)
|
||||
SELECT
|
||||
'KEEP vendorid:' as action,
|
||||
MIN(vendorid) as keep_id,
|
||||
LOWER(TRIM(vendor)) as normalized_name,
|
||||
GROUP_CONCAT(vendor ORDER BY vendorid SEPARATOR ' -> ') as consolidating,
|
||||
GROUP_CONCAT(CASE WHEN vendorid != MIN(vendorid) THEN vendorid END) as will_delete_ids,
|
||||
COUNT(*) - 1 as duplicates_to_remove
|
||||
FROM vendors
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(vendor))
|
||||
HAVING COUNT(*) > 1;
|
||||
|
||||
-- Show models that will be updated
|
||||
SELECT
|
||||
'Models to be updated:' as action,
|
||||
mo.modelnumberid,
|
||||
mo.modelnumber,
|
||||
v_old.vendorid as old_vendor_id,
|
||||
v_old.vendor as old_vendor_name,
|
||||
v_new.vendorid as new_vendor_id,
|
||||
v_new.vendor as new_vendor_name
|
||||
FROM models mo
|
||||
JOIN vendors v_old ON mo.vendorid = v_old.vendorid
|
||||
JOIN (
|
||||
SELECT MIN(vendorid) as keep_id, LOWER(TRIM(vendor)) as norm
|
||||
FROM vendors
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(vendor))
|
||||
HAVING COUNT(*) > 1
|
||||
) keepers ON LOWER(TRIM(v_old.vendor)) = keepers.norm
|
||||
JOIN vendors v_new ON v_new.vendorid = keepers.keep_id
|
||||
WHERE v_old.vendorid != v_new.vendorid
|
||||
ORDER BY mo.modelnumberid;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 4: Execute Vendor Consolidation
|
||||
-- =====================================================
|
||||
|
||||
SELECT '============================================' AS '';
|
||||
SELECT 'STEP 4: Executing Vendor Consolidation' AS '';
|
||||
SELECT '============================================' AS '';
|
||||
|
||||
-- Update models to point to keeper vendor
|
||||
UPDATE models mo
|
||||
JOIN vendors v_old ON mo.vendorid = v_old.vendorid
|
||||
JOIN (
|
||||
SELECT MIN(vendorid) as keep_id, LOWER(TRIM(vendor)) as norm
|
||||
FROM vendors
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(vendor))
|
||||
HAVING COUNT(*) > 1
|
||||
) keepers ON LOWER(TRIM(v_old.vendor)) = keepers.norm
|
||||
SET mo.vendorid = keepers.keep_id
|
||||
WHERE v_old.vendorid != keepers.keep_id;
|
||||
|
||||
SELECT ROW_COUNT() as models_updated;
|
||||
|
||||
-- Mark duplicate vendors as inactive
|
||||
UPDATE vendors v
|
||||
JOIN (
|
||||
SELECT vendorid
|
||||
FROM vendors v2
|
||||
WHERE v2.isactive = 1
|
||||
AND LOWER(TRIM(v2.vendor)) IN (
|
||||
SELECT LOWER(TRIM(vendor))
|
||||
FROM vendors
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(vendor))
|
||||
HAVING COUNT(*) > 1
|
||||
)
|
||||
AND v2.vendorid NOT IN (
|
||||
SELECT MIN(vendorid)
|
||||
FROM vendors
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(vendor))
|
||||
)
|
||||
) dups ON v.vendorid = dups.vendorid
|
||||
SET v.isactive = 0;
|
||||
|
||||
SELECT ROW_COUNT() as vendors_deactivated;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 5: Consolidate Duplicate Models
|
||||
-- =====================================================
|
||||
|
||||
SELECT '============================================' AS '';
|
||||
SELECT 'STEP 5: Executing Model Consolidation' AS '';
|
||||
SELECT '============================================' AS '';
|
||||
|
||||
-- Update machines to point to keeper model (normalized: spaces, hyphens, underscores removed)
|
||||
UPDATE machines m
|
||||
JOIN models mo_old ON m.modelnumberid = mo_old.modelnumberid
|
||||
JOIN (
|
||||
SELECT MIN(modelnumberid) as keep_id,
|
||||
REPLACE(REPLACE(REPLACE(LOWER(TRIM(modelnumber)), ' ', ''), '-', ''), '_', '') as norm,
|
||||
vendorid
|
||||
FROM models
|
||||
WHERE isactive = 1
|
||||
GROUP BY REPLACE(REPLACE(REPLACE(LOWER(TRIM(modelnumber)), ' ', ''), '-', ''), '_', ''), vendorid
|
||||
HAVING COUNT(*) > 1
|
||||
) keepers ON REPLACE(REPLACE(REPLACE(LOWER(TRIM(mo_old.modelnumber)), ' ', ''), '-', ''), '_', '') = keepers.norm
|
||||
AND mo_old.vendorid = keepers.vendorid
|
||||
SET m.modelnumberid = keepers.keep_id
|
||||
WHERE mo_old.modelnumberid != keepers.keep_id;
|
||||
|
||||
SELECT ROW_COUNT() as machines_updated;
|
||||
|
||||
-- Mark duplicate models as inactive
|
||||
UPDATE models mo
|
||||
JOIN (
|
||||
SELECT modelnumberid
|
||||
FROM models mo2
|
||||
WHERE mo2.isactive = 1
|
||||
AND (REPLACE(REPLACE(REPLACE(LOWER(TRIM(mo2.modelnumber)), ' ', ''), '-', ''), '_', ''), mo2.vendorid) IN (
|
||||
SELECT REPLACE(REPLACE(REPLACE(LOWER(TRIM(modelnumber)), ' ', ''), '-', ''), '_', ''), vendorid
|
||||
FROM models
|
||||
WHERE isactive = 1
|
||||
GROUP BY REPLACE(REPLACE(REPLACE(LOWER(TRIM(modelnumber)), ' ', ''), '-', ''), '_', ''), vendorid
|
||||
HAVING COUNT(*) > 1
|
||||
)
|
||||
AND mo2.modelnumberid NOT IN (
|
||||
SELECT MIN(modelnumberid)
|
||||
FROM models
|
||||
WHERE isactive = 1
|
||||
GROUP BY REPLACE(REPLACE(REPLACE(LOWER(TRIM(modelnumber)), ' ', ''), '-', ''), '_', ''), vendorid
|
||||
)
|
||||
) dups ON mo.modelnumberid = dups.modelnumberid
|
||||
SET mo.isactive = 0;
|
||||
|
||||
SELECT ROW_COUNT() as models_deactivated;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 6: Verification
|
||||
-- =====================================================
|
||||
|
||||
SELECT '============================================' AS '';
|
||||
SELECT 'STEP 6: Verification' AS '';
|
||||
SELECT '============================================' AS '';
|
||||
|
||||
SELECT 'Active vendors after cleanup:' as status, COUNT(*) as count
|
||||
FROM vendors WHERE isactive = 1;
|
||||
|
||||
SELECT 'Active models after cleanup:' as status, COUNT(*) as count
|
||||
FROM models WHERE isactive = 1;
|
||||
|
||||
SELECT 'Remaining duplicate vendors:' as status, COUNT(*) as count
|
||||
FROM (
|
||||
SELECT LOWER(TRIM(vendor)) as norm
|
||||
FROM vendors
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(vendor))
|
||||
HAVING COUNT(*) > 1
|
||||
) dup_check;
|
||||
|
||||
SELECT 'Remaining duplicate models:' as status, COUNT(*) as count
|
||||
FROM (
|
||||
SELECT LOWER(TRIM(modelnumber)), vendorid
|
||||
FROM models
|
||||
WHERE isactive = 1
|
||||
GROUP BY LOWER(TRIM(modelnumber)), vendorid
|
||||
HAVING COUNT(*) > 1
|
||||
) dup_check;
|
||||
|
||||
SET SQL_SAFE_UPDATES = 1;
|
||||
|
||||
SELECT '============================================' AS '';
|
||||
SELECT 'DRY RUN COMPLETE' AS '';
|
||||
SELECT 'Review results above, then uncomment' AS '';
|
||||
SELECT 'STEP 4 and STEP 5 to execute cleanup' AS '';
|
||||
SELECT '============================================' AS '';
|
||||
@@ -1,88 +0,0 @@
|
||||
-- Create Sample Network Infrastructure Devices
|
||||
-- Date: 2025-11-13
|
||||
-- Purpose: Add test data for servers, switches, cameras, access points, and IDFs
|
||||
-- Note: These devices go into the machines table with specific machinetypeid values
|
||||
|
||||
USE shopdb;
|
||||
|
||||
-- Network device type IDs:
|
||||
-- 16 = Access Point
|
||||
-- 17 = IDF
|
||||
-- 18 = Camera
|
||||
-- 19 = Switch
|
||||
-- 20 = Server
|
||||
|
||||
-- Insert sample Switches (machinetypeid = 19)
|
||||
INSERT INTO machines (machinenumber, machinetypeid, alias, mapleft, maptop, isactive, islocationonly)
|
||||
VALUES
|
||||
('SW-CORE-01', 19, 'Core Switch 1', 1200, 800, 1, 0),
|
||||
('SW-DIST-01', 19, 'Distribution Switch 1', 1400, 900, 1, 0),
|
||||
('SW-ACCESS-01', 19, 'Access Switch 1', 1600, 1000, 1, 0),
|
||||
('SW-ACCESS-02', 19, 'Access Switch 2', 800, 1200, 1, 0),
|
||||
('SW-OFFICE-01', 19, 'Office Switch', 1800, 1500, 1, 0);
|
||||
|
||||
-- Insert sample Servers (machinetypeid = 20)
|
||||
INSERT INTO machines (machinenumber, machinetypeid, alias, mapleft, maptop, isactive, islocationonly)
|
||||
VALUES
|
||||
('SRV-DC-01', 20, 'Domain Controller 1', 1100, 700, 1, 0),
|
||||
('SRV-SQL-01', 20, 'SQL Database Server', 1300, 750, 1, 0),
|
||||
('SRV-FILE-01', 20, 'File Server', 1500, 800, 1, 0),
|
||||
('SRV-WEB-01', 20, 'Web Application Server', 1700, 850, 1, 0),
|
||||
('SRV-BACKUP-01', 20, 'Backup Server', 900, 650, 1, 0);
|
||||
|
||||
-- Insert sample Cameras (machinetypeid = 18)
|
||||
INSERT INTO machines (machinenumber, machinetypeid, alias, mapleft, maptop, isactive, islocationonly)
|
||||
VALUES
|
||||
('CAM-ENTRY-01', 18, 'Main Entry Camera', 600, 1800, 1, 0),
|
||||
('CAM-SHIPPING-01', 18, 'Shipping Dock Camera', 2000, 600, 1, 0),
|
||||
('CAM-FLOOR-01', 18, 'Shop Floor Camera 1', 1500, 1200, 1, 0),
|
||||
('CAM-FLOOR-02', 18, 'Shop Floor Camera 2', 1800, 1400, 1, 0),
|
||||
('CAM-OFFICE-01', 18, 'Office Area Camera', 1200, 1900, 1, 0),
|
||||
('CAM-PARKING-01', 18, 'Parking Lot Camera', 400, 2000, 1, 0);
|
||||
|
||||
-- Insert sample Access Points (machinetypeid = 16)
|
||||
INSERT INTO machines (machinenumber, machinetypeid, alias, mapleft, maptop, isactive, islocationonly)
|
||||
VALUES
|
||||
('AP-OFFICE-01', 16, 'Office Access Point 1', 1100, 1800, 1, 0),
|
||||
('AP-OFFICE-02', 16, 'Office Access Point 2', 1700, 1800, 1, 0),
|
||||
('AP-SHOP-01', 16, 'Shop Floor AP 1', 1200, 1100, 1, 0),
|
||||
('AP-SHOP-02', 16, 'Shop Floor AP 2', 1600, 1300, 1, 0),
|
||||
('AP-WAREHOUSE-01', 16, 'Warehouse Access Point', 2100, 800, 1, 0);
|
||||
|
||||
-- Insert sample IDFs (machinetypeid = 17)
|
||||
INSERT INTO machines (machinenumber, machinetypeid, alias, mapleft, maptop, isactive, islocationonly)
|
||||
VALUES
|
||||
('IDF-MAIN', 17, 'Main IDF Room', 1150, 750, 1, 0),
|
||||
('IDF-EAST', 17, 'East Wing IDF', 1900, 1200, 1, 0),
|
||||
('IDF-WEST', 17, 'West Wing IDF', 700, 1300, 1, 0),
|
||||
('IDF-SHOP', 17, 'Shop Floor IDF', 1500, 1000, 1, 0);
|
||||
|
||||
-- Add IP addresses to some devices via communications table
|
||||
-- Get the machineids we just created
|
||||
SET @sw_core_id = (SELECT machineid FROM machines WHERE machinenumber = 'SW-CORE-01' LIMIT 1);
|
||||
SET @srv_dc_id = (SELECT machineid FROM machines WHERE machinenumber = 'SRV-DC-01' LIMIT 1);
|
||||
SET @srv_sql_id = (SELECT machineid FROM machines WHERE machinenumber = 'SRV-SQL-01' LIMIT 1);
|
||||
SET @cam_entry_id = (SELECT machineid FROM machines WHERE machinenumber = 'CAM-ENTRY-01' LIMIT 1);
|
||||
SET @ap_office_id = (SELECT machineid FROM machines WHERE machinenumber = 'AP-OFFICE-01' LIMIT 1);
|
||||
|
||||
-- Insert communications records (comstypeid = 1 for Ethernet)
|
||||
INSERT INTO communications (machineid, comstypeid, address, isprimary, isactive)
|
||||
VALUES
|
||||
(@sw_core_id, 1, '10.80.1.1', 1, 1),
|
||||
(@srv_dc_id, 1, '10.80.1.10', 1, 1),
|
||||
(@srv_sql_id, 1, '10.80.1.11', 1, 1),
|
||||
(@cam_entry_id, 1, '10.80.2.50', 1, 1),
|
||||
(@ap_office_id, 1, '10.80.3.100', 1, 1);
|
||||
|
||||
-- Show summary
|
||||
SELECT 'Sample Network Devices Created' AS status;
|
||||
|
||||
SELECT
|
||||
mt.machinetype,
|
||||
COUNT(*) AS total,
|
||||
SUM(CASE WHEN m.mapleft IS NOT NULL AND m.maptop IS NOT NULL THEN 1 ELSE 0 END) AS with_map_coords
|
||||
FROM machines m
|
||||
INNER JOIN machinetypes mt ON m.machinetypeid = mt.machinetypeid
|
||||
WHERE mt.machinetypeid IN (16, 17, 18, 19, 20)
|
||||
GROUP BY mt.machinetype
|
||||
ORDER BY mt.machinetypeid;
|
||||
1169
sql/dev-backup-20251120-105614.sql
Normal file
1169
sql/dev-backup-20251120-105614.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -1,169 +0,0 @@
|
||||
-- Import Production Data into Development Database
|
||||
-- Date: 2025-11-13
|
||||
-- Purpose: Import notifications, notificationtypes, printers, and knowledgebase from production backup
|
||||
-- Source: database-backup-11-13-25-eod.sql (extracted via extract_prod_data.sh)
|
||||
--
|
||||
-- IMPORTANT: This script will:
|
||||
-- 1. Backup existing dev data to temporary tables
|
||||
-- 2. Clear and import notification types first (lookup table)
|
||||
-- 3. Import notifications with proper foreign key references
|
||||
-- 4. Import printers (preserving any dev-specific test data if needed)
|
||||
-- 5. Import knowledgebase articles
|
||||
-- 6. Provide rollback capability via backup tables
|
||||
|
||||
USE shopdb;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 1: Create backup tables for rollback capability
|
||||
-- ==============================================================================
|
||||
|
||||
DROP TABLE IF EXISTS `notifications_backup_20251113`;
|
||||
CREATE TABLE `notifications_backup_20251113` LIKE `notifications`;
|
||||
INSERT INTO `notifications_backup_20251113` SELECT * FROM `notifications`;
|
||||
|
||||
DROP TABLE IF EXISTS `notificationtypes_backup_20251113`;
|
||||
CREATE TABLE `notificationtypes_backup_20251113` LIKE `notificationtypes`;
|
||||
INSERT INTO `notificationtypes_backup_20251113` SELECT * FROM `notificationtypes`;
|
||||
|
||||
DROP TABLE IF EXISTS `printers_backup_20251113`;
|
||||
CREATE TABLE `printers_backup_20251113` LIKE `printers`;
|
||||
INSERT INTO `printers_backup_20251113` SELECT * FROM `printers`;
|
||||
|
||||
DROP TABLE IF EXISTS `knowledgebase_backup_20251113`;
|
||||
CREATE TABLE `knowledgebase_backup_20251113` LIKE `knowledgebase`;
|
||||
INSERT INTO `knowledgebase_backup_20251113` SELECT * FROM `knowledgebase`;
|
||||
|
||||
SELECT 'Backup tables created' AS status;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 2: Show current counts (before import)
|
||||
-- ==============================================================================
|
||||
|
||||
SELECT 'Current Data Counts (BEFORE import):' AS info;
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM notifications) AS notifications_count,
|
||||
(SELECT COUNT(*) FROM notificationtypes) AS notificationtypes_count,
|
||||
(SELECT COUNT(*) FROM printers) AS printers_count,
|
||||
(SELECT COUNT(*) FROM knowledgebase) AS knowledgebase_count;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 3: Import Notification Types (lookup table, import first)
|
||||
-- ==============================================================================
|
||||
|
||||
-- Temporarily disable foreign key checks
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- Clear existing notification types
|
||||
DELETE FROM `notificationtypes`;
|
||||
|
||||
-- Import from production
|
||||
-- Note: The extracted file contains the INSERT statements
|
||||
-- We'll run this via source command
|
||||
|
||||
SELECT 'Ready to import notificationtypes from prod_notificationtypes.sql' AS status;
|
||||
-- SOURCE /home/camp/projects/windows/shopdb/sql/prod_notificationtypes.sql
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 4: Import Notifications
|
||||
-- ==============================================================================
|
||||
|
||||
-- Clear existing notifications
|
||||
DELETE FROM `notifications`;
|
||||
|
||||
-- Import from production
|
||||
SELECT 'Ready to import notifications from prod_notifications.sql' AS status;
|
||||
-- SOURCE /home/camp/projects/windows/shopdb/sql/prod_notifications.sql
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 5: Import Printers
|
||||
-- ==============================================================================
|
||||
|
||||
-- Clear existing printers
|
||||
DELETE FROM `printers`;
|
||||
|
||||
-- Import from production
|
||||
SELECT 'Ready to import printers from prod_printers.sql' AS status;
|
||||
-- SOURCE /home/camp/projects/windows/shopdb/sql/prod_printers.sql
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 6: Import Knowledgebase
|
||||
-- ==============================================================================
|
||||
|
||||
-- Clear existing knowledgebase
|
||||
DELETE FROM `knowledgebase`;
|
||||
|
||||
-- Import from production
|
||||
SELECT 'Ready to import knowledgebase from prod_knowledgebase.sql' AS status;
|
||||
-- SOURCE /home/camp/projects/windows/shopdb/sql/prod_knowledgebase.sql
|
||||
|
||||
-- Re-enable foreign key checks
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 7: Verify imported data
|
||||
-- ==============================================================================
|
||||
|
||||
SELECT 'Import Complete - New Data Counts:' AS info;
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM notifications) AS notifications_count,
|
||||
(SELECT COUNT(*) FROM notificationtypes) AS notificationtypes_count,
|
||||
(SELECT COUNT(*) FROM printers) AS printers_count,
|
||||
(SELECT COUNT(*) FROM knowledgebase) AS knowledgebase_count;
|
||||
|
||||
-- Show sample data from each table
|
||||
SELECT 'Sample Notifications:' AS info;
|
||||
SELECT notificationid, notificationtypeid, notification, starttime, endtime, isactive
|
||||
FROM notifications
|
||||
WHERE isactive = 1
|
||||
ORDER BY starttime DESC
|
||||
LIMIT 5;
|
||||
|
||||
SELECT 'Notification Types:' AS info;
|
||||
SELECT * FROM notificationtypes WHERE isactive = 1;
|
||||
|
||||
SELECT 'Sample Printers:' AS info;
|
||||
SELECT printerid, printerwindowsname, ipaddress, isactive, iscsf
|
||||
FROM printers
|
||||
WHERE isactive = 1
|
||||
LIMIT 10;
|
||||
|
||||
SELECT 'Sample Knowledgebase Articles:' AS info;
|
||||
SELECT linkid, shortdescription, keywords, clicks, isactive
|
||||
FROM knowledgebase
|
||||
WHERE isactive = 1
|
||||
ORDER BY clicks DESC
|
||||
LIMIT 10;
|
||||
|
||||
-- ==============================================================================
|
||||
-- ROLLBACK INSTRUCTIONS (if needed)
|
||||
-- ==============================================================================
|
||||
/*
|
||||
-- If you need to rollback this import, run these commands:
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
DELETE FROM notifications;
|
||||
INSERT INTO notifications SELECT * FROM notifications_backup_20251113;
|
||||
|
||||
DELETE FROM notificationtypes;
|
||||
INSERT INTO notificationtypes SELECT * FROM notificationtypes_backup_20251113;
|
||||
|
||||
DELETE FROM printers;
|
||||
INSERT INTO printers SELECT * FROM printers_backup_20251113;
|
||||
|
||||
DELETE FROM knowledgebase;
|
||||
INSERT INTO knowledgebase SELECT * FROM knowledgebase_backup_20251113;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
-- Then drop backup tables:
|
||||
DROP TABLE IF EXISTS notifications_backup_20251113;
|
||||
DROP TABLE IF EXISTS notificationtypes_backup_20251113;
|
||||
DROP TABLE IF EXISTS printers_backup_20251113;
|
||||
DROP TABLE IF EXISTS knowledgebase_backup_20251113;
|
||||
*/
|
||||
|
||||
SELECT '========================================' AS '';
|
||||
SELECT 'Import process ready!' AS status;
|
||||
SELECT 'Run the actual import with: source /home/camp/projects/windows/shopdb/sql/import_prod_data_execute.sql' AS next_step;
|
||||
SELECT '========================================' AS '';
|
||||
@@ -1,135 +0,0 @@
|
||||
-- Execute Production Data Import
|
||||
-- Date: 2025-11-13
|
||||
-- This script actually performs the import of production data
|
||||
|
||||
USE shopdb;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 1: Create backup tables
|
||||
-- ==============================================================================
|
||||
|
||||
DROP TABLE IF EXISTS `notifications_backup_20251113`;
|
||||
CREATE TABLE `notifications_backup_20251113` LIKE `notifications`;
|
||||
INSERT INTO `notifications_backup_20251113` SELECT * FROM `notifications`;
|
||||
|
||||
DROP TABLE IF EXISTS `notificationtypes_backup_20251113`;
|
||||
CREATE TABLE `notificationtypes_backup_20251113` LIKE `notificationtypes`;
|
||||
INSERT INTO `notificationtypes_backup_20251113` SELECT * FROM `notificationtypes`;
|
||||
|
||||
DROP TABLE IF EXISTS `printers_backup_20251113`;
|
||||
CREATE TABLE `printers_backup_20251113` LIKE `printers`;
|
||||
INSERT INTO `printers_backup_20251113` SELECT * FROM `printers`;
|
||||
|
||||
DROP TABLE IF EXISTS `knowledgebase_backup_20251113`;
|
||||
CREATE TABLE `knowledgebase_backup_20251113` LIKE `knowledgebase`;
|
||||
INSERT INTO `knowledgebase_backup_20251113` SELECT * FROM `knowledgebase`;
|
||||
|
||||
SELECT 'Backup tables created successfully' AS status;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 2: Show current counts
|
||||
-- ==============================================================================
|
||||
|
||||
SELECT '=== BEFORE IMPORT ===' AS '';
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM notifications) AS notifications_before,
|
||||
(SELECT COUNT(*) FROM notificationtypes) AS notificationtypes_before,
|
||||
(SELECT COUNT(*) FROM printers) AS printers_before,
|
||||
(SELECT COUNT(*) FROM knowledgebase) AS knowledgebase_before;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 3: Disable foreign key checks and clear tables
|
||||
-- ==============================================================================
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
SET AUTOCOMMIT = 0;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 4: Import Notification Types
|
||||
-- ==============================================================================
|
||||
|
||||
DELETE FROM `notificationtypes`;
|
||||
SOURCE /home/camp/projects/windows/shopdb/sql/prod_notificationtypes.sql;
|
||||
SELECT 'Notification types imported' AS status;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 5: Import Notifications
|
||||
-- ==============================================================================
|
||||
|
||||
DELETE FROM `notifications`;
|
||||
SOURCE /home/camp/projects/windows/shopdb/sql/prod_notifications.sql;
|
||||
SELECT 'Notifications imported' AS status;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 6: Import Printers
|
||||
-- ==============================================================================
|
||||
|
||||
DELETE FROM `printers`;
|
||||
SOURCE /home/camp/projects/windows/shopdb/sql/prod_printers.sql;
|
||||
SELECT 'Printers imported' AS status;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 7: Import Knowledgebase
|
||||
-- ==============================================================================
|
||||
|
||||
DELETE FROM `knowledgebase`;
|
||||
SOURCE /home/camp/projects/windows/shopdb/sql/prod_knowledgebase.sql;
|
||||
SELECT 'Knowledgebase articles imported' AS status;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 8: Re-enable constraints and commit
|
||||
-- ==============================================================================
|
||||
|
||||
COMMIT;
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
SET AUTOCOMMIT = 1;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 9: Verify imported data
|
||||
-- ==============================================================================
|
||||
|
||||
SELECT '=== AFTER IMPORT ===' AS '';
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM notifications) AS notifications_after,
|
||||
(SELECT COUNT(*) FROM notificationtypes) AS notificationtypes_after,
|
||||
(SELECT COUNT(*) FROM printers) AS printers_after,
|
||||
(SELECT COUNT(*) FROM knowledgebase) AS knowledgebase_after;
|
||||
|
||||
-- ==============================================================================
|
||||
-- STEP 10: Show sample imported data
|
||||
-- ==============================================================================
|
||||
|
||||
SELECT '=== Notification Types ===' AS '';
|
||||
SELECT notificationtypeid, typename, typedescription, typecolor, isactive
|
||||
FROM notificationtypes
|
||||
ORDER BY notificationtypeid;
|
||||
|
||||
SELECT '=== Recent Active Notifications ===' AS '';
|
||||
SELECT notificationid, notificationtypeid, notification, starttime, endtime, ticketnumber, isactive
|
||||
FROM notifications
|
||||
WHERE isactive = 1
|
||||
ORDER BY starttime DESC
|
||||
LIMIT 10;
|
||||
|
||||
SELECT '=== Active Printers ===' AS '';
|
||||
SELECT printerid, printerwindowsname, ipaddress, serialnumber, isactive, iscsf
|
||||
FROM printers
|
||||
WHERE isactive = 1
|
||||
LIMIT 15;
|
||||
|
||||
SELECT '=== Top Knowledge Base Articles ===' AS '';
|
||||
SELECT linkid, shortdescription, keywords, clicks, isactive
|
||||
FROM knowledgebase
|
||||
WHERE isactive = 1
|
||||
ORDER BY clicks DESC
|
||||
LIMIT 10;
|
||||
|
||||
-- ==============================================================================
|
||||
-- SUCCESS MESSAGE
|
||||
-- ==============================================================================
|
||||
|
||||
SELECT '========================================' AS '';
|
||||
SELECT 'IMPORT SUCCESSFUL!' AS status;
|
||||
SELECT 'Backup tables created with _backup_20251113 suffix' AS info;
|
||||
SELECT 'To rollback, see rollback instructions in import_prod_data.sql' AS rollback_info;
|
||||
SELECT '========================================' AS '';
|
||||
62
sql/migration_phase4/01_create_appversions_table.sql
Normal file
62
sql/migration_phase4/01_create_appversions_table.sql
Normal file
@@ -0,0 +1,62 @@
|
||||
-- =====================================================
|
||||
-- SCRIPT 01: Create Application Versions Infrastructure
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Create appversions table for tracking application versions
|
||||
-- Status: REVERSIBLE (see ROLLBACK_01)
|
||||
-- Estimated Time: < 1 minute
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
SET SQL_SAFE_UPDATES = 0;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 1: Create appversions table
|
||||
-- =====================================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS appversions (
|
||||
appversionid INT(11) PRIMARY KEY AUTO_INCREMENT,
|
||||
appid TINYINT(4) NOT NULL,
|
||||
version VARCHAR(50) NOT NULL,
|
||||
releasedate DATE NULL,
|
||||
notes VARCHAR(255) NULL,
|
||||
isactive BIT(1) DEFAULT b'1',
|
||||
dateadded DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
-- Indexes
|
||||
KEY idx_appid (appid),
|
||||
KEY idx_version (version),
|
||||
KEY idx_isactive (isactive),
|
||||
|
||||
-- Unique constraint: one version string per application
|
||||
UNIQUE KEY uk_app_version (appid, version),
|
||||
|
||||
-- Foreign Key
|
||||
CONSTRAINT fk_appversions_appid FOREIGN KEY (appid) REFERENCES applications(appid)
|
||||
ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
COMMENT='Application version tracking for installed software';
|
||||
|
||||
-- =====================================================
|
||||
-- VERIFICATION
|
||||
-- =====================================================
|
||||
|
||||
SELECT '✓ appversions table created' AS status;
|
||||
SELECT
|
||||
TABLE_NAME,
|
||||
ENGINE,
|
||||
TABLE_ROWS,
|
||||
TABLE_COMMENT
|
||||
FROM information_schema.TABLES
|
||||
WHERE TABLE_SCHEMA = 'shopdb' AND TABLE_NAME = 'appversions';
|
||||
|
||||
SELECT '✓ Script 01 completed successfully' AS status;
|
||||
|
||||
SET SQL_SAFE_UPDATES = 1;
|
||||
|
||||
-- =====================================================
|
||||
-- NOTES
|
||||
-- =====================================================
|
||||
-- Next: Run script 02_add_appversionid_to_installedapps.sql
|
||||
-- Rollback: Run ROLLBACK_01_appversions_table.sql
|
||||
-- =====================================================
|
||||
102
sql/migration_phase4/02_add_appversionid_to_installedapps.sql
Normal file
102
sql/migration_phase4/02_add_appversionid_to_installedapps.sql
Normal file
@@ -0,0 +1,102 @@
|
||||
-- =====================================================
|
||||
-- SCRIPT 02: Add appversionid to installedapps
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Add version tracking column to installedapps table
|
||||
-- Status: REVERSIBLE (see ROLLBACK_02)
|
||||
-- Estimated Time: < 1 minute
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
SET SQL_SAFE_UPDATES = 0;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 1: Add appversionid column to installedapps
|
||||
-- =====================================================
|
||||
|
||||
-- Check if column exists before adding
|
||||
SET @column_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND COLUMN_NAME = 'appversionid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@column_exists = 0,
|
||||
'ALTER TABLE installedapps ADD COLUMN appversionid INT(11) NULL AFTER appid',
|
||||
'SELECT "Column appversionid already exists" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 2: Add foreign key constraint
|
||||
-- =====================================================
|
||||
|
||||
-- Check if FK exists before adding
|
||||
SET @fk_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.TABLE_CONSTRAINTS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND CONSTRAINT_NAME = 'fk_installedapps_appversionid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@fk_exists = 0,
|
||||
'ALTER TABLE installedapps ADD CONSTRAINT fk_installedapps_appversionid FOREIGN KEY (appversionid) REFERENCES appversions(appversionid) ON DELETE SET NULL ON UPDATE CASCADE',
|
||||
'SELECT "FK fk_installedapps_appversionid already exists" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 3: Add index for performance
|
||||
-- =====================================================
|
||||
|
||||
SET @idx_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.STATISTICS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND INDEX_NAME = 'idx_appversionid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@idx_exists = 0,
|
||||
'ALTER TABLE installedapps ADD INDEX idx_appversionid (appversionid)',
|
||||
'SELECT "Index idx_appversionid already exists" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- =====================================================
|
||||
-- VERIFICATION
|
||||
-- =====================================================
|
||||
|
||||
SELECT '✓ installedapps table updated' AS status;
|
||||
|
||||
SELECT
|
||||
COLUMN_NAME,
|
||||
DATA_TYPE,
|
||||
IS_NULLABLE,
|
||||
COLUMN_DEFAULT
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
ORDER BY ORDINAL_POSITION;
|
||||
|
||||
SELECT '✓ Script 02 completed successfully' AS status;
|
||||
|
||||
SET SQL_SAFE_UPDATES = 1;
|
||||
|
||||
-- =====================================================
|
||||
-- NOTES
|
||||
-- =====================================================
|
||||
-- Existing installedapps records will have appversionid = NULL
|
||||
-- PowerShell API will need updating to populate this field
|
||||
-- Next: Run script 03_add_appid_to_notifications.sql
|
||||
-- Rollback: Run ROLLBACK_02_installedapps_appversionid.sql
|
||||
-- =====================================================
|
||||
102
sql/migration_phase4/03_add_appid_to_notifications.sql
Normal file
102
sql/migration_phase4/03_add_appid_to_notifications.sql
Normal file
@@ -0,0 +1,102 @@
|
||||
-- =====================================================
|
||||
-- SCRIPT 03: Add optional appid to notifications
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Allow notifications to be optionally linked to an application
|
||||
-- Status: REVERSIBLE (see ROLLBACK_03)
|
||||
-- Estimated Time: < 1 minute
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
SET SQL_SAFE_UPDATES = 0;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 1: Add appid column to notifications
|
||||
-- =====================================================
|
||||
|
||||
-- Check if column exists before adding
|
||||
SET @column_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
AND COLUMN_NAME = 'appid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@column_exists = 0,
|
||||
'ALTER TABLE notifications ADD COLUMN appid TINYINT(4) NULL AFTER businessunitid',
|
||||
'SELECT "Column appid already exists" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 2: Add foreign key constraint
|
||||
-- =====================================================
|
||||
|
||||
-- Check if FK exists before adding
|
||||
SET @fk_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.TABLE_CONSTRAINTS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
AND CONSTRAINT_NAME = 'fk_notifications_appid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@fk_exists = 0,
|
||||
'ALTER TABLE notifications ADD CONSTRAINT fk_notifications_appid FOREIGN KEY (appid) REFERENCES applications(appid) ON DELETE SET NULL ON UPDATE CASCADE',
|
||||
'SELECT "FK fk_notifications_appid already exists" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- =====================================================
|
||||
-- STEP 3: Add index for performance
|
||||
-- =====================================================
|
||||
|
||||
SET @idx_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.STATISTICS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
AND INDEX_NAME = 'idx_notifications_appid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@idx_exists = 0,
|
||||
'ALTER TABLE notifications ADD INDEX idx_notifications_appid (appid)',
|
||||
'SELECT "Index idx_notifications_appid already exists" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- =====================================================
|
||||
-- VERIFICATION
|
||||
-- =====================================================
|
||||
|
||||
SELECT '✓ notifications table updated' AS status;
|
||||
|
||||
SELECT
|
||||
COLUMN_NAME,
|
||||
DATA_TYPE,
|
||||
IS_NULLABLE,
|
||||
COLUMN_DEFAULT
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
ORDER BY ORDINAL_POSITION;
|
||||
|
||||
SELECT '✓ Script 03 completed successfully' AS status;
|
||||
|
||||
SET SQL_SAFE_UPDATES = 1;
|
||||
|
||||
-- =====================================================
|
||||
-- NOTES
|
||||
-- =====================================================
|
||||
-- appid is optional (NULL allowed) - most notifications won't be app-specific
|
||||
-- Use case: "PC-DMIS upgrade scheduled" notification linked to PC-DMIS app
|
||||
-- Next: Run VERIFY_PHASE4_MIGRATION.sql
|
||||
-- Rollback: Run ROLLBACK_03_notifications_appid.sql
|
||||
-- =====================================================
|
||||
177
sql/migration_phase4/README.md
Normal file
177
sql/migration_phase4/README.md
Normal file
@@ -0,0 +1,177 @@
|
||||
# Phase 4 Migration: Application Versions
|
||||
|
||||
**Date:** 2025-11-25
|
||||
**Status:** Ready for deployment
|
||||
|
||||
## Overview
|
||||
|
||||
This migration adds application version tracking to ShopDB:
|
||||
|
||||
1. **`appversions` table** - Stores version strings for each application
|
||||
2. **`installedapps.appversionid`** - Links installed apps to specific versions
|
||||
3. **`notifications.appid`** - Optional link from notifications to applications
|
||||
|
||||
## Schema Changes
|
||||
|
||||
### New Table: appversions
|
||||
|
||||
```sql
|
||||
CREATE TABLE appversions (
|
||||
appversionid INT PRIMARY KEY AUTO_INCREMENT,
|
||||
appid TINYINT(4) NOT NULL, -- FK to applications
|
||||
version VARCHAR(50) NOT NULL, -- Version string (e.g., "2.1.0.45")
|
||||
releasedate DATE NULL, -- Optional release date
|
||||
notes VARCHAR(255) NULL, -- Optional notes
|
||||
isactive BIT(1) DEFAULT 1,
|
||||
dateadded DATETIME DEFAULT NOW(),
|
||||
UNIQUE KEY (appid, version) -- One entry per app+version combo
|
||||
);
|
||||
```
|
||||
|
||||
### Modified Table: installedapps
|
||||
|
||||
```sql
|
||||
-- Added column:
|
||||
appversionid INT NULL -- FK to appversions (NULL for legacy records)
|
||||
```
|
||||
|
||||
### Modified Table: notifications
|
||||
|
||||
```sql
|
||||
-- Added column:
|
||||
appid TINYINT(4) NULL -- FK to applications (optional app association)
|
||||
```
|
||||
|
||||
## Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `01_create_appversions_table.sql` | Creates the appversions table |
|
||||
| `02_add_appversionid_to_installedapps.sql` | Adds version FK to installedapps |
|
||||
| `03_add_appid_to_notifications.sql` | Adds app FK to notifications |
|
||||
| `VERIFY_PHASE4_MIGRATION.sql` | Verifies all changes |
|
||||
| `RUN_ALL_PHASE4_SCRIPTS.sql` | Runs all scripts in order |
|
||||
| `ROLLBACK_01_appversions_table.sql` | Drops appversions table |
|
||||
| `ROLLBACK_02_installedapps_appversionid.sql` | Removes installedapps column |
|
||||
| `ROLLBACK_03_notifications_appid.sql` | Removes notifications column |
|
||||
|
||||
## Deployment Instructions
|
||||
|
||||
### Prerequisites
|
||||
|
||||
1. Create database backup:
|
||||
```bash
|
||||
mysqldump -u root -p shopdb > shopdb_backup_$(date +%Y%m%d_%H%M%S).sql
|
||||
```
|
||||
|
||||
2. Verify current schema:
|
||||
```bash
|
||||
mysql -u root -p shopdb -e "DESCRIBE installedapps; DESCRIBE notifications;"
|
||||
```
|
||||
|
||||
### Run Migration
|
||||
|
||||
**Option A: Run all scripts at once**
|
||||
```bash
|
||||
cd /path/to/sql/migration_phase4
|
||||
mysql -u root -p shopdb < RUN_ALL_PHASE4_SCRIPTS.sql
|
||||
```
|
||||
|
||||
**Option B: Run scripts individually**
|
||||
```bash
|
||||
mysql -u root -p shopdb < 01_create_appversions_table.sql
|
||||
mysql -u root -p shopdb < 02_add_appversionid_to_installedapps.sql
|
||||
mysql -u root -p shopdb < 03_add_appid_to_notifications.sql
|
||||
mysql -u root -p shopdb < VERIFY_PHASE4_MIGRATION.sql
|
||||
```
|
||||
|
||||
### Verify Success
|
||||
|
||||
```bash
|
||||
mysql -u root -p shopdb < VERIFY_PHASE4_MIGRATION.sql
|
||||
```
|
||||
|
||||
All checks should show `✓ PASS`.
|
||||
|
||||
## Rollback Instructions
|
||||
|
||||
If you need to rollback, run scripts in reverse order:
|
||||
|
||||
```bash
|
||||
mysql -u root -p shopdb < ROLLBACK_03_notifications_appid.sql
|
||||
mysql -u root -p shopdb < ROLLBACK_02_installedapps_appversionid.sql
|
||||
mysql -u root -p shopdb < ROLLBACK_01_appversions_table.sql
|
||||
```
|
||||
|
||||
**Warning:** Rolling back `ROLLBACK_01` will delete all version data.
|
||||
|
||||
## Post-Migration: Code Changes Required
|
||||
|
||||
### 1. api.asp - Update GetOrCreateApplication()
|
||||
|
||||
The function needs to:
|
||||
- Look up or create the application in `applications`
|
||||
- Look up or create the version in `appversions`
|
||||
- Return `appversionid` to store in `installedapps`
|
||||
|
||||
### 2. api.asp - Update UpdateInstalledApps()
|
||||
|
||||
Change INSERT to include `appversionid`:
|
||||
```sql
|
||||
INSERT INTO installedapps (machineid, appid, appversionid, isactive)
|
||||
VALUES (?, ?, ?, ?)
|
||||
```
|
||||
|
||||
### 3. Notification forms (addnotification.asp, editnotification.asp)
|
||||
|
||||
Add optional application dropdown to link notifications to apps.
|
||||
|
||||
### 4. Display pages
|
||||
|
||||
- `displayinstalledapps.asp` - Show version column
|
||||
- `displaynotifications.asp` - Show linked app name
|
||||
|
||||
## Example Queries
|
||||
|
||||
### Get installed apps with versions
|
||||
```sql
|
||||
SELECT
|
||||
m.hostname,
|
||||
a.appname,
|
||||
av.version,
|
||||
ia.isactive
|
||||
FROM installedapps ia
|
||||
JOIN machines m ON ia.machineid = m.machineid
|
||||
JOIN applications a ON ia.appid = a.appid
|
||||
LEFT JOIN appversions av ON ia.appversionid = av.appversionid
|
||||
WHERE m.pctypeid IS NOT NULL
|
||||
ORDER BY m.hostname, a.appname;
|
||||
```
|
||||
|
||||
### Get notifications with linked apps
|
||||
```sql
|
||||
SELECT
|
||||
n.notification,
|
||||
n.starttime,
|
||||
n.endtime,
|
||||
a.appname AS related_app
|
||||
FROM notifications n
|
||||
LEFT JOIN applications a ON n.appid = a.appid
|
||||
WHERE n.isactive = 1
|
||||
ORDER BY n.starttime DESC;
|
||||
```
|
||||
|
||||
### Find all versions of a specific app
|
||||
```sql
|
||||
SELECT
|
||||
a.appname,
|
||||
av.version,
|
||||
av.releasedate,
|
||||
COUNT(ia.machineid) AS install_count
|
||||
FROM applications a
|
||||
JOIN appversions av ON a.appid = av.appid
|
||||
LEFT JOIN installedapps ia ON av.appversionid = ia.appversionid
|
||||
WHERE a.appname LIKE '%PC-DMIS%'
|
||||
GROUP BY a.appid, av.appversionid
|
||||
ORDER BY av.version DESC;
|
||||
```
|
||||
34
sql/migration_phase4/ROLLBACK_01_appversions_table.sql
Normal file
34
sql/migration_phase4/ROLLBACK_01_appversions_table.sql
Normal file
@@ -0,0 +1,34 @@
|
||||
-- =====================================================
|
||||
-- ROLLBACK 01: Remove appversions table
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Rollback script for 01_create_appversions_table.sql
|
||||
-- WARNING: This will delete all version data!
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
SET SQL_SAFE_UPDATES = 0;
|
||||
|
||||
-- Must remove FK from installedapps first (if it exists)
|
||||
SET @fk_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.TABLE_CONSTRAINTS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND CONSTRAINT_NAME = 'fk_installedapps_appversionid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@fk_exists > 0,
|
||||
'ALTER TABLE installedapps DROP FOREIGN KEY fk_installedapps_appversionid',
|
||||
'SELECT "FK does not exist" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- Drop appversions table
|
||||
DROP TABLE IF EXISTS appversions;
|
||||
|
||||
SELECT '✓ appversions table dropped' AS status;
|
||||
|
||||
SET SQL_SAFE_UPDATES = 1;
|
||||
@@ -0,0 +1,64 @@
|
||||
-- =====================================================
|
||||
-- ROLLBACK 02: Remove appversionid from installedapps
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Rollback script for 02_add_appversionid_to_installedapps.sql
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
SET SQL_SAFE_UPDATES = 0;
|
||||
|
||||
-- Drop FK first
|
||||
SET @fk_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.TABLE_CONSTRAINTS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND CONSTRAINT_NAME = 'fk_installedapps_appversionid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@fk_exists > 0,
|
||||
'ALTER TABLE installedapps DROP FOREIGN KEY fk_installedapps_appversionid',
|
||||
'SELECT "FK does not exist" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- Drop index
|
||||
SET @idx_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.STATISTICS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND INDEX_NAME = 'idx_appversionid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@idx_exists > 0,
|
||||
'ALTER TABLE installedapps DROP INDEX idx_appversionid',
|
||||
'SELECT "Index does not exist" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- Drop column
|
||||
SET @column_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND COLUMN_NAME = 'appversionid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@column_exists > 0,
|
||||
'ALTER TABLE installedapps DROP COLUMN appversionid',
|
||||
'SELECT "Column does not exist" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
SELECT '✓ appversionid removed from installedapps' AS status;
|
||||
|
||||
SET SQL_SAFE_UPDATES = 1;
|
||||
64
sql/migration_phase4/ROLLBACK_03_notifications_appid.sql
Normal file
64
sql/migration_phase4/ROLLBACK_03_notifications_appid.sql
Normal file
@@ -0,0 +1,64 @@
|
||||
-- =====================================================
|
||||
-- ROLLBACK 03: Remove appid from notifications
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Rollback script for 03_add_appid_to_notifications.sql
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
SET SQL_SAFE_UPDATES = 0;
|
||||
|
||||
-- Drop FK first
|
||||
SET @fk_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.TABLE_CONSTRAINTS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
AND CONSTRAINT_NAME = 'fk_notifications_appid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@fk_exists > 0,
|
||||
'ALTER TABLE notifications DROP FOREIGN KEY fk_notifications_appid',
|
||||
'SELECT "FK does not exist" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- Drop index
|
||||
SET @idx_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.STATISTICS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
AND INDEX_NAME = 'idx_notifications_appid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@idx_exists > 0,
|
||||
'ALTER TABLE notifications DROP INDEX idx_notifications_appid',
|
||||
'SELECT "Index does not exist" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
-- Drop column
|
||||
SET @column_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
AND COLUMN_NAME = 'appid'
|
||||
);
|
||||
|
||||
SET @sql = IF(@column_exists > 0,
|
||||
'ALTER TABLE notifications DROP COLUMN appid',
|
||||
'SELECT "Column does not exist" AS status'
|
||||
);
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
SELECT '✓ appid removed from notifications' AS status;
|
||||
|
||||
SET SQL_SAFE_UPDATES = 1;
|
||||
75
sql/migration_phase4/RUN_ALL_PHASE4_SCRIPTS.sql
Normal file
75
sql/migration_phase4/RUN_ALL_PHASE4_SCRIPTS.sql
Normal file
@@ -0,0 +1,75 @@
|
||||
-- =====================================================
|
||||
-- RUN ALL PHASE 4 SCRIPTS: Application Versions
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Execute all Phase 4 migration scripts in order
|
||||
--
|
||||
-- USAGE:
|
||||
-- mysql -u root -p shopdb < RUN_ALL_PHASE4_SCRIPTS.sql
|
||||
--
|
||||
-- OR run each script individually:
|
||||
-- 1. 01_create_appversions_table.sql
|
||||
-- 2. 02_add_appversionid_to_installedapps.sql
|
||||
-- 3. 03_add_appid_to_notifications.sql
|
||||
-- 4. VERIFY_PHASE4_MIGRATION.sql
|
||||
--
|
||||
-- ROLLBACK ORDER (if needed):
|
||||
-- 1. ROLLBACK_03_notifications_appid.sql
|
||||
-- 2. ROLLBACK_02_installedapps_appversionid.sql
|
||||
-- 3. ROLLBACK_01_appversions_table.sql
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
|
||||
SELECT '=================================================' AS '';
|
||||
SELECT 'PHASE 4 MIGRATION: Application Versions' AS '';
|
||||
SELECT 'Started at: ' AS '', NOW() AS timestamp;
|
||||
SELECT '=================================================' AS '';
|
||||
|
||||
-- =====================================================
|
||||
-- PRE-MIGRATION BACKUP REMINDER
|
||||
-- =====================================================
|
||||
SELECT 'REMINDER: Ensure you have a database backup before proceeding!' AS '';
|
||||
SELECT '' AS '';
|
||||
|
||||
-- =====================================================
|
||||
-- SCRIPT 1: Create appversions table
|
||||
-- =====================================================
|
||||
SELECT '--- Running Script 01: Create appversions table ---' AS '';
|
||||
|
||||
SOURCE 01_create_appversions_table.sql;
|
||||
|
||||
-- =====================================================
|
||||
-- SCRIPT 2: Add appversionid to installedapps
|
||||
-- =====================================================
|
||||
SELECT '--- Running Script 02: Add appversionid to installedapps ---' AS '';
|
||||
|
||||
SOURCE 02_add_appversionid_to_installedapps.sql;
|
||||
|
||||
-- =====================================================
|
||||
-- SCRIPT 3: Add appid to notifications
|
||||
-- =====================================================
|
||||
SELECT '--- Running Script 03: Add appid to notifications ---' AS '';
|
||||
|
||||
SOURCE 03_add_appid_to_notifications.sql;
|
||||
|
||||
-- =====================================================
|
||||
-- VERIFICATION
|
||||
-- =====================================================
|
||||
SELECT '--- Running Verification ---' AS '';
|
||||
|
||||
SOURCE VERIFY_PHASE4_MIGRATION.sql;
|
||||
|
||||
-- =====================================================
|
||||
-- COMPLETE
|
||||
-- =====================================================
|
||||
SELECT '=================================================' AS '';
|
||||
SELECT 'PHASE 4 MIGRATION COMPLETE' AS '';
|
||||
SELECT 'Finished at: ' AS '', NOW() AS timestamp;
|
||||
SELECT '=================================================' AS '';
|
||||
SELECT '' AS '';
|
||||
SELECT 'NEXT STEPS:' AS '';
|
||||
SELECT '1. Update api.asp to use appversions table' AS '';
|
||||
SELECT '2. Update PowerShell script to send version data' AS '';
|
||||
SELECT '3. Update notification forms to allow app selection' AS '';
|
||||
SELECT '=================================================' AS '';
|
||||
127
sql/migration_phase4/VERIFY_PHASE4_MIGRATION.sql
Normal file
127
sql/migration_phase4/VERIFY_PHASE4_MIGRATION.sql
Normal file
@@ -0,0 +1,127 @@
|
||||
-- =====================================================
|
||||
-- VERIFY PHASE 4 MIGRATION: Application Versions
|
||||
-- =====================================================
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Verify all Phase 4 schema changes are in place
|
||||
-- Run this after all migration scripts complete
|
||||
-- =====================================================
|
||||
|
||||
USE shopdb;
|
||||
|
||||
SELECT '=================================================' AS '';
|
||||
SELECT 'PHASE 4 MIGRATION VERIFICATION' AS '';
|
||||
SELECT '=================================================' AS '';
|
||||
|
||||
-- =====================================================
|
||||
-- CHECK 1: appversions table exists
|
||||
-- =====================================================
|
||||
SELECT '--- CHECK 1: appversions table ---' AS '';
|
||||
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN '✓ PASS' ELSE '✗ FAIL' END AS appversions_table_exists
|
||||
FROM information_schema.TABLES
|
||||
WHERE TABLE_SCHEMA = 'shopdb' AND TABLE_NAME = 'appversions';
|
||||
|
||||
SELECT
|
||||
COLUMN_NAME,
|
||||
DATA_TYPE,
|
||||
IS_NULLABLE,
|
||||
COLUMN_KEY
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb' AND TABLE_NAME = 'appversions'
|
||||
ORDER BY ORDINAL_POSITION;
|
||||
|
||||
-- =====================================================
|
||||
-- CHECK 2: installedapps.appversionid column exists
|
||||
-- =====================================================
|
||||
SELECT '--- CHECK 2: installedapps.appversionid column ---' AS '';
|
||||
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN '✓ PASS' ELSE '✗ FAIL' END AS appversionid_column_exists
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND COLUMN_NAME = 'appversionid';
|
||||
|
||||
-- Check FK
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN '✓ PASS' ELSE '✗ FAIL' END AS installedapps_fk_exists
|
||||
FROM information_schema.TABLE_CONSTRAINTS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'installedapps'
|
||||
AND CONSTRAINT_NAME = 'fk_installedapps_appversionid';
|
||||
|
||||
-- =====================================================
|
||||
-- CHECK 3: notifications.appid column exists
|
||||
-- =====================================================
|
||||
SELECT '--- CHECK 3: notifications.appid column ---' AS '';
|
||||
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN '✓ PASS' ELSE '✗ FAIL' END AS notifications_appid_column_exists
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
AND COLUMN_NAME = 'appid';
|
||||
|
||||
-- Check FK
|
||||
SELECT
|
||||
CASE WHEN COUNT(*) > 0 THEN '✓ PASS' ELSE '✗ FAIL' END AS notifications_appid_fk_exists
|
||||
FROM information_schema.TABLE_CONSTRAINTS
|
||||
WHERE TABLE_SCHEMA = 'shopdb'
|
||||
AND TABLE_NAME = 'notifications'
|
||||
AND CONSTRAINT_NAME = 'fk_notifications_appid';
|
||||
|
||||
-- =====================================================
|
||||
-- CHECK 4: Foreign key relationships
|
||||
-- =====================================================
|
||||
SELECT '--- CHECK 4: Foreign key relationships ---' AS '';
|
||||
|
||||
SELECT
|
||||
CONSTRAINT_NAME,
|
||||
TABLE_NAME,
|
||||
REFERENCED_TABLE_NAME
|
||||
FROM information_schema.REFERENTIAL_CONSTRAINTS
|
||||
WHERE CONSTRAINT_SCHEMA = 'shopdb'
|
||||
AND (
|
||||
CONSTRAINT_NAME LIKE '%appversion%'
|
||||
OR (TABLE_NAME = 'notifications' AND CONSTRAINT_NAME LIKE '%appid%')
|
||||
);
|
||||
|
||||
-- =====================================================
|
||||
-- SUMMARY: Current record counts
|
||||
-- =====================================================
|
||||
SELECT '--- SUMMARY: Record counts ---' AS '';
|
||||
|
||||
SELECT
|
||||
'applications' AS table_name,
|
||||
COUNT(*) AS record_count
|
||||
FROM applications
|
||||
UNION ALL
|
||||
SELECT
|
||||
'appversions' AS table_name,
|
||||
COUNT(*) AS record_count
|
||||
FROM appversions
|
||||
UNION ALL
|
||||
SELECT
|
||||
'installedapps' AS table_name,
|
||||
COUNT(*) AS record_count
|
||||
FROM installedapps
|
||||
UNION ALL
|
||||
SELECT
|
||||
'installedapps (with version)' AS table_name,
|
||||
COUNT(*) AS record_count
|
||||
FROM installedapps WHERE appversionid IS NOT NULL
|
||||
UNION ALL
|
||||
SELECT
|
||||
'notifications' AS table_name,
|
||||
COUNT(*) AS record_count
|
||||
FROM notifications
|
||||
UNION ALL
|
||||
SELECT
|
||||
'notifications (app-linked)' AS table_name,
|
||||
COUNT(*) AS record_count
|
||||
FROM notifications WHERE appid IS NOT NULL;
|
||||
|
||||
SELECT '=================================================' AS '';
|
||||
SELECT 'PHASE 4 VERIFICATION COMPLETE' AS '';
|
||||
SELECT '=================================================' AS '';
|
||||
32
sql/migration_phase4/add_specialized_pc_types.sql
Normal file
32
sql/migration_phase4/add_specialized_pc_types.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
-- ============================================================================
|
||||
-- Migration: Add Specialized PC Machine Types
|
||||
-- Date: 2025-12-03
|
||||
-- Purpose: Add PC types for CMM, Wax Trace, and Measuring Tool PCs
|
||||
--
|
||||
-- These PC types allow categorization of PCs based on installed software:
|
||||
-- - PC - CMM: PCs running PC-DMIS for CMM measurement
|
||||
-- - PC - Wax Trace: PCs running Formtracepak for wax trace inspection
|
||||
-- - PC - Measuring Tool: PCs running Keyence/Genspect for measurement
|
||||
--
|
||||
-- This enables proper PC-to-Equipment relationships:
|
||||
-- - PC - CMM (41) <-> CMM equipment (machinetypeid 3)
|
||||
-- - PC - Wax Trace (42) <-> Wax Trace equipment (machinetypeid 5)
|
||||
-- - PC - Measuring Tool (43) <-> Measuring Machine equipment (machinetypeid 23)
|
||||
-- ============================================================================
|
||||
|
||||
-- Add new specialized PC machine types
|
||||
INSERT INTO machinetypes (machinetypeid, machinetype, isactive, functionalaccountid, bgcolor, machinedescription)
|
||||
VALUES
|
||||
(41, 'PC - CMM', 1, NULL, NULL, 'PC running PC-DMIS for CMM measurement'),
|
||||
(42, 'PC - Wax Trace', 1, NULL, NULL, 'PC running Formtracepak for wax trace inspection'),
|
||||
(43, 'PC - Measuring Tool', 1, NULL, NULL, 'PC running Keyence/Genspect for measurement')
|
||||
ON DUPLICATE KEY UPDATE
|
||||
machinetype = VALUES(machinetype),
|
||||
machinedescription = VALUES(machinedescription),
|
||||
isactive = 1;
|
||||
|
||||
-- Verify the changes
|
||||
SELECT machinetypeid, machinetype, machinedescription, isactive
|
||||
FROM machinetypes
|
||||
WHERE machinetypeid IN (41, 42, 43)
|
||||
ORDER BY machinetypeid;
|
||||
33
sql/migration_phase4/create_tv_slides_table.sql
Normal file
33
sql/migration_phase4/create_tv_slides_table.sql
Normal file
@@ -0,0 +1,33 @@
|
||||
-- TV Dashboard Slides Management
|
||||
-- Run this script to create the tables for TV slide management
|
||||
|
||||
-- Table to store slide presentations/folders
|
||||
CREATE TABLE IF NOT EXISTS tv_presentations (
|
||||
presentationid INT AUTO_INCREMENT PRIMARY KEY,
|
||||
name VARCHAR(100) NOT NULL,
|
||||
folder_path VARCHAR(500) NOT NULL COMMENT 'Full path or subfolder name under base path',
|
||||
interval_seconds INT DEFAULT 10 COMMENT 'Seconds between slides',
|
||||
isactive TINYINT(1) DEFAULT 0 COMMENT 'Only one should be active at a time',
|
||||
created_date DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
lastupdated DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
notes VARCHAR(500)
|
||||
);
|
||||
|
||||
-- Table to store individual slides (optional - for when you want to manage slides in DB)
|
||||
CREATE TABLE IF NOT EXISTS tv_slides (
|
||||
slideid INT AUTO_INCREMENT PRIMARY KEY,
|
||||
presentationid INT NOT NULL,
|
||||
filename VARCHAR(255) NOT NULL,
|
||||
display_order INT DEFAULT 0,
|
||||
isactive TINYINT(1) DEFAULT 1,
|
||||
created_date DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (presentationid) REFERENCES tv_presentations(presentationid) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Insert default presentation
|
||||
INSERT INTO tv_presentations (name, folder_path, interval_seconds, isactive, notes)
|
||||
VALUES ('Default', 'S:\\ProcessData\\CommDisplay\\ShopSS', 10, 1, 'Default presentation folder');
|
||||
|
||||
-- Example: Add a holiday presentation (inactive by default)
|
||||
-- INSERT INTO tv_presentations (name, folder_path, interval_seconds, isactive, notes)
|
||||
-- VALUES ('Christmas 2025', 'Christmas2025', 10, 0, 'Holiday slides - subfolder of base path');
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,216 +0,0 @@
|
||||
ALTER TABLE knowledgebase DISABLE KEYS;
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
INSERT INTO `knowledgebase` (`linkid`, `shortdescription`, `keywords`, `appid`, `linkurl`, `lastupdated`, `isactive`, `linknotes`, `clicks`, `notes`) VALUES
|
||||
ALTER TABLE knowledgebase ENABLE KEYS;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,58 +0,0 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
INSERT INTO `notifications` (`notificationid`, `notificationtypeid`, `businessunitid`, `notification`, `starttime`, `endtime`, `ticketnumber`, `link`, `isactive`, `isshopfloor`) VALUES
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
INSERT INTO `notificationtypes` (`notificationtypeid`, `typename`, `typedescription`, `typecolor`, `isactive`) VALUES
|
||||
INSERT INTO `notificationtypes` (`notificationtypeid`, `typename`, `typedescription`, `typecolor`, `isactive`) VALUES
|
||||
INSERT INTO `notificationtypes` (`notificationtypeid`, `typename`, `typedescription`, `typecolor`, `isactive`) VALUES
|
||||
INSERT INTO `notificationtypes` (`notificationtypeid`, `typename`, `typedescription`, `typecolor`, `isactive`) VALUES
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -1,988 +0,0 @@
|
||||
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) */;
|
||||
@@ -1,47 +0,0 @@
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
INSERT INTO `printers` (`printerid`, `modelid`, `printerwindowsname`, `printercsfname`, `serialnumber`, `fqdn`, `ipaddress`, `machineid`, `maptop`, `mapleft`, `iscsf`, `installpath`, `isactive`, `lastupdate`, `printernotes`, `printerpin`) VALUES
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -1,46 +0,0 @@
|
||||
-- Remove Sample Network Infrastructure Devices
|
||||
-- Date: 2025-11-13
|
||||
-- Purpose: Delete the test devices created for demonstration
|
||||
|
||||
USE shopdb;
|
||||
|
||||
-- Remove communications entries for sample devices first (to avoid foreign key issues)
|
||||
DELETE FROM communications
|
||||
WHERE machineid IN (
|
||||
SELECT machineid FROM machines
|
||||
WHERE machinenumber IN (
|
||||
'SW-CORE-01', 'SW-DIST-01', 'SW-ACCESS-01', 'SW-ACCESS-02', 'SW-OFFICE-01',
|
||||
'SRV-DC-01', 'SRV-SQL-01', 'SRV-FILE-01', 'SRV-WEB-01', 'SRV-BACKUP-01',
|
||||
'CAM-ENTRY-01', 'CAM-SHIPPING-01', 'CAM-FLOOR-01', 'CAM-FLOOR-02', 'CAM-OFFICE-01', 'CAM-PARKING-01',
|
||||
'AP-OFFICE-01', 'AP-OFFICE-02', 'AP-SHOP-01', 'AP-SHOP-02', 'AP-WAREHOUSE-01',
|
||||
'IDF-MAIN', 'IDF-EAST', 'IDF-WEST', 'IDF-SHOP'
|
||||
)
|
||||
);
|
||||
|
||||
-- Delete the sample network devices from machines table
|
||||
DELETE FROM machines
|
||||
WHERE machinenumber IN (
|
||||
-- Switches
|
||||
'SW-CORE-01', 'SW-DIST-01', 'SW-ACCESS-01', 'SW-ACCESS-02', 'SW-OFFICE-01',
|
||||
-- Servers
|
||||
'SRV-DC-01', 'SRV-SQL-01', 'SRV-FILE-01', 'SRV-WEB-01', 'SRV-BACKUP-01',
|
||||
-- Cameras
|
||||
'CAM-ENTRY-01', 'CAM-SHIPPING-01', 'CAM-FLOOR-01', 'CAM-FLOOR-02', 'CAM-OFFICE-01', 'CAM-PARKING-01',
|
||||
-- Access Points
|
||||
'AP-OFFICE-01', 'AP-OFFICE-02', 'AP-SHOP-01', 'AP-SHOP-02', 'AP-WAREHOUSE-01',
|
||||
-- IDFs
|
||||
'IDF-MAIN', 'IDF-EAST', 'IDF-WEST', 'IDF-SHOP'
|
||||
);
|
||||
|
||||
-- Show summary
|
||||
SELECT 'Sample network devices removed' AS status;
|
||||
|
||||
SELECT
|
||||
mt.machinetype,
|
||||
COUNT(*) AS remaining_count
|
||||
FROM machines m
|
||||
INNER JOIN machinetypes mt ON m.machinetypeid = mt.machinetypeid
|
||||
WHERE mt.machinetypeid IN (16, 17, 18, 19, 20)
|
||||
AND m.isactive = 1
|
||||
GROUP BY mt.machinetype
|
||||
ORDER BY mt.machinetypeid;
|
||||
@@ -1,126 +1,13 @@
|
||||
-- Update vw_network_devices view to include machines table network devices
|
||||
-- Date: 2025-11-13
|
||||
-- Purpose: Make network_devices.asp show devices from machines table with network device types
|
||||
-- Update vw_network_devices view for Phase 3 (legacy tables dropped)
|
||||
-- Date: 2025-11-25
|
||||
-- Purpose: Network devices now come from machines table (16-20) and printers table
|
||||
-- Legacy tables (idfs, servers, switches, cameras, accesspoints) have been dropped
|
||||
|
||||
USE shopdb;
|
||||
|
||||
DROP VIEW IF EXISTS vw_network_devices;
|
||||
|
||||
CREATE VIEW vw_network_devices AS
|
||||
-- IDFs from separate table
|
||||
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 idfs i
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Servers from separate table
|
||||
SELECT
|
||||
'Server' AS device_type,
|
||||
s.serverid AS device_id,
|
||||
s.servername AS device_name,
|
||||
s.modelid,
|
||||
m.modelnumber,
|
||||
v.vendor,
|
||||
s.serialnumber,
|
||||
s.ipaddress,
|
||||
s.description,
|
||||
s.maptop,
|
||||
s.mapleft,
|
||||
s.isactive,
|
||||
NULL AS idfid,
|
||||
NULL AS idfname,
|
||||
NULL AS macaddress
|
||||
FROM servers s
|
||||
LEFT JOIN models m ON s.modelid = m.modelnumberid
|
||||
LEFT JOIN vendors v ON m.vendorid = v.vendorid
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Switches from separate table
|
||||
SELECT
|
||||
'Switch' AS device_type,
|
||||
sw.switchid AS device_id,
|
||||
sw.switchname AS device_name,
|
||||
sw.modelid,
|
||||
m.modelnumber,
|
||||
v.vendor,
|
||||
sw.serialnumber,
|
||||
sw.ipaddress,
|
||||
sw.description,
|
||||
sw.maptop,
|
||||
sw.mapleft,
|
||||
sw.isactive,
|
||||
NULL AS idfid,
|
||||
NULL AS idfname,
|
||||
NULL AS macaddress
|
||||
FROM switches sw
|
||||
LEFT JOIN models m ON sw.modelid = m.modelnumberid
|
||||
LEFT JOIN vendors v ON m.vendorid = v.vendorid
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Cameras from separate table
|
||||
SELECT
|
||||
'Camera' AS device_type,
|
||||
c.cameraid AS device_id,
|
||||
c.cameraname AS device_name,
|
||||
c.modelid,
|
||||
m.modelnumber,
|
||||
v.vendor,
|
||||
c.serialnumber,
|
||||
c.ipaddress,
|
||||
c.description,
|
||||
c.maptop,
|
||||
c.mapleft,
|
||||
c.isactive,
|
||||
c.idfid,
|
||||
i.idfname,
|
||||
c.macaddress
|
||||
FROM cameras c
|
||||
LEFT JOIN models m ON c.modelid = m.modelnumberid
|
||||
LEFT JOIN vendors v ON m.vendorid = v.vendorid
|
||||
LEFT JOIN idfs i ON c.idfid = i.idfid
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Access Points from separate table
|
||||
SELECT
|
||||
'Access Point' AS device_type,
|
||||
a.apid AS device_id,
|
||||
a.apname AS device_name,
|
||||
a.modelid,
|
||||
m.modelnumber,
|
||||
v.vendor,
|
||||
a.serialnumber,
|
||||
a.ipaddress,
|
||||
a.description,
|
||||
a.maptop,
|
||||
a.mapleft,
|
||||
a.isactive,
|
||||
NULL AS idfid,
|
||||
NULL AS idfname,
|
||||
NULL AS macaddress
|
||||
FROM accesspoints a
|
||||
LEFT JOIN models m ON a.modelid = m.modelnumberid
|
||||
LEFT JOIN vendors v ON m.vendorid = v.vendorid
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Printers from separate table
|
||||
SELECT
|
||||
'Printer' AS device_type,
|
||||
@@ -137,7 +24,8 @@ SELECT
|
||||
p.isactive,
|
||||
NULL AS idfid,
|
||||
NULL AS idfname,
|
||||
NULL AS macaddress
|
||||
NULL AS macaddress,
|
||||
p.fqdn
|
||||
FROM printers p
|
||||
LEFT JOIN models m ON p.modelid = m.modelnumberid
|
||||
LEFT JOIN vendors v ON m.vendorid = v.vendorid
|
||||
@@ -145,6 +33,7 @@ LEFT JOIN vendors v ON m.vendorid = v.vendorid
|
||||
UNION ALL
|
||||
|
||||
-- Network devices from machines table (machinetypeid 16-20)
|
||||
-- 16=Access Point, 17=IDF, 18=Camera, 19=Switch, 20=Server
|
||||
SELECT
|
||||
mt.machinetype AS device_type,
|
||||
ma.machineid AS device_id,
|
||||
@@ -154,13 +43,14 @@ SELECT
|
||||
ve.vendor,
|
||||
ma.serialnumber,
|
||||
c.address AS ipaddress,
|
||||
NULL AS description,
|
||||
ma.machinenotes AS description,
|
||||
ma.maptop,
|
||||
ma.mapleft,
|
||||
ma.isactive,
|
||||
NULL AS idfid,
|
||||
NULL AS idfname,
|
||||
NULL AS macaddress
|
||||
c.macaddress,
|
||||
NULL AS fqdn
|
||||
FROM machines ma
|
||||
INNER JOIN machinetypes mt ON ma.machinetypeid = mt.machinetypeid
|
||||
LEFT JOIN models mo ON ma.modelnumberid = mo.modelnumberid
|
||||
|
||||
56
sql/usb_checkout_schema.sql
Normal file
56
sql/usb_checkout_schema.sql
Normal file
@@ -0,0 +1,56 @@
|
||||
-- USB Device Checkout System Schema
|
||||
-- Created: 2025-12-07
|
||||
--
|
||||
-- This script adds:
|
||||
-- 1. New machine type for USB devices (machinetypeid = 44)
|
||||
-- 2. New usb_checkouts table for tracking checkout/check-in records
|
||||
|
||||
-- ============================================
|
||||
-- 1. Add USB Device machine type
|
||||
-- ============================================
|
||||
INSERT INTO machinetypes (machinetypeid, machinetype, isactive)
|
||||
VALUES (44, 'USB Device', 1)
|
||||
ON DUPLICATE KEY UPDATE machinetype = 'USB Device', isactive = 1;
|
||||
|
||||
-- ============================================
|
||||
-- 2. Create usb_checkouts table
|
||||
-- ============================================
|
||||
CREATE TABLE IF NOT EXISTS usb_checkouts (
|
||||
checkoutid INT(11) NOT NULL AUTO_INCREMENT,
|
||||
machineid INT(11) NOT NULL, -- FK to machines (USB device)
|
||||
sso VARCHAR(20) NOT NULL, -- Who checked it out (9-digit SSO)
|
||||
checkout_reason TEXT, -- Why they need it
|
||||
checkout_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
checkin_time DATETIME DEFAULT NULL, -- NULL = still checked out
|
||||
was_wiped TINYINT(1) DEFAULT NULL, -- 1=yes, 0=no, NULL=not checked in yet
|
||||
checkin_notes TEXT, -- Notes on check-in
|
||||
PRIMARY KEY (checkoutid),
|
||||
KEY idx_usb_machineid (machineid),
|
||||
KEY idx_usb_sso (sso),
|
||||
KEY idx_usb_checkout_time (checkout_time),
|
||||
KEY idx_usb_checkin_time (checkin_time),
|
||||
CONSTRAINT fk_usb_checkouts_machine FOREIGN KEY (machineid)
|
||||
REFERENCES machines(machineid) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ============================================
|
||||
-- 3. Sample USB devices for testing (optional)
|
||||
-- ============================================
|
||||
-- Uncomment to add test data:
|
||||
-- INSERT INTO machines (machinenumber, serialnumber, alias, machinetypeid, businessunitid, isactive)
|
||||
-- VALUES
|
||||
-- ('USB-001', 'SN-USB-001', 'Blue 32GB', 44, 1, 1),
|
||||
-- ('USB-002', 'SN-USB-002', 'Red 64GB', 44, 1, 1),
|
||||
-- ('USB-003', 'SN-USB-003', 'White 16GB', 44, 1, 1);
|
||||
|
||||
-- ============================================
|
||||
-- Verification queries
|
||||
-- ============================================
|
||||
-- Check machine type was added:
|
||||
-- SELECT * FROM machinetypes WHERE machinetypeid = 44;
|
||||
|
||||
-- Check table was created:
|
||||
-- DESCRIBE usb_checkouts;
|
||||
|
||||
-- List USB devices:
|
||||
-- SELECT * FROM machines WHERE machinetypeid = 44;
|
||||
Reference in New Issue
Block a user