-- 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 등)';

-- Modify the temperature column to VARCHAR to allow storing status strings like '정상', '오류'
-- This resolves the error from the previous migration attempt.
ALTER TABLE `temperature_logs` MODIFY `temperature` VARCHAR(50) NULL DEFAULT NULL;

-- Example of how to update your new equipment to use the 'status' check type.
-- You can run this after adding POS and Coffee Machine via the UI.
-- UPDATE `equipment` SET `check_type` = 'status' WHERE `name` IN ('POS', '커피머신');
