IF EXISTS (
    SELECT 1
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'devicesstatusinformation'
      AND COLUMN_NAME = 'BatteryLevelWithoutLoad'
)
BEGIN
    ALTER TABLE devicesstatusinformation DROP COLUMN BatteryLevelWithoutLoad;
END;
