-- Add check_type to equipment table to differentiate between temperature and status checks
ALTER TABLE `equipment` ADD COLUMN `check_type` VARCHAR(50) NOT NULL DEFAULT 'temperature' COMMENT '점검 유형 (temperature, status 등)';

-- Add log_status to temperature_logs table for non-numeric check results
ALTER TABLE `temperature_logs` ADD COLUMN `log_status` VARCHAR(50) NULL DEFAULT NULL COMMENT '상태 점검 결과 (정상, 오류 등)';

-- Allow temperature to be nullable for status checks
ALTER TABLE `temperature_logs` MODIFY `temperature` DECIMAL(5,2) NULL;

-- Update existing equipment that might be status-based checks (example)
-- UPDATE `equipment` SET `check_type` = 'status' WHERE `name` IN ('POS', '커피머신');
