Bug fix, when any any data for a sensor is available, return nil in the min,max array.
Add a Rails "primary key", to get sensor add working.

Can't add composite primary key due to Rails limitation and gem
composite_primary_keys won’t work.