-- Add relationship types for location management (bins, shelves, PC storage)
-- Run against production MySQL

-- New relationship types
INSERT INTO relationshiptypes (relationshiptypeid, relationshiptype, description, isactive, displayorder) VALUES
(7, 'Contains', 'Location contains a sub-location (e.g., Bin contains Shelf)', 1, 7),
(8, 'Stored At', 'PC or device is stored at this location', 1, 8);

-- Fix DT Office -> GJX9B2Z3ESF from "Controls" to "Stored At"
-- Verify relationshipid 69 matches on prod before running
UPDATE machinerelationships SET relationshiptypeid = 8 WHERE relationshipid = 69;

-- Flag IT Closet as a location (machineid=258)
UPDATE machines SET islocationonly = 1 WHERE machineid = 258;
