mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-02-16 18:47:40 -05:00
Updates for new hardware
- New model package - Remove battery level - Change light level decimal scale
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
INSERT INTO Reading (Timestamp, WindDirection, WindSpeed, Humidity, HumidityTemperature, Rain, Pressure,
|
||||
PressureTemperature, BatteryLevel, LightLevel, Latitude, Longitude, Altitude,
|
||||
PressureTemperature, LightLevel, Latitude, Longitude, Altitude,
|
||||
SatelliteCount, GpsTimestamp)
|
||||
VALUES (@Timestamp, @WindDirection, @WindSpeed, @Humidity, @HumidityTemperature, @Rain, @Pressure, @PressureTemperature,
|
||||
@BatteryLevel, @LightLevel, @Latitude, @Longitude, @Altitude, @SatelliteCount, @GpsTimestamp)
|
||||
@LightLevel, @Latitude, @Longitude, @Altitude, @SatelliteCount, @GpsTimestamp)
|
||||
@@ -5,7 +5,6 @@ SELECT Timestamp,
|
||||
Rain,
|
||||
Pressure,
|
||||
PressureTemperature AS Temperature,
|
||||
BatteryLevel,
|
||||
LightLevel,
|
||||
Latitude,
|
||||
Longitude,
|
||||
|
||||
@@ -5,7 +5,6 @@ SELECT TOP 1 Timestamp,
|
||||
Rain,
|
||||
Pressure,
|
||||
PressureTemperature AS Temperature,
|
||||
BatteryLevel,
|
||||
LightLevel,
|
||||
Latitude,
|
||||
Longitude,
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
Rain decimal(2, 2) NOT NULL,
|
||||
Pressure decimal(8, 2) NOT NULL,
|
||||
PressureTemperature decimal(4, 1) NOT NULL,
|
||||
BatteryLevel decimal(4, 2) NOT NULL,
|
||||
LightLevel decimal(3, 2) NOT NULL,
|
||||
Latitude decimal(9, 6) NOT NULL,
|
||||
Longitude decimal(9, 6) NOT NULL,
|
||||
@@ -22,4 +21,7 @@
|
||||
|
||||
ALTER TABLE Reading ALTER COLUMN Rain decimal(3, 3);
|
||||
|
||||
ALTER TABLE Reading ALTER COLUMN BatteryLevel decimal(4, 2);
|
||||
IF COL_LENGTH('Reading', 'BatteryLevel') IS NOT NULL
|
||||
ALTER TABLE Reading DROP COLUMN BatteryLevel;
|
||||
|
||||
ALTER TABLE Reading ALTER COLUMN LightLevel decimal(8, 2);
|
||||
|
||||
Reference in New Issue
Block a user