-- sql/alter_readings_add_location.sql
ALTER TABLE readings
  ADD COLUMN latitude  DECIMAL(9,6)  NULL AFTER km,
  ADD COLUMN longitude DECIMAL(9,6)  NULL AFTER latitude,
  ADD COLUMN location_accuracy DECIMAL(6,2) NULL AFTER longitude;

CREATE INDEX idx_readings_loc ON readings (latitude, longitude);
