Open sidstamm opened 5 years ago
Currently when weather data is downloaded and imported to the database, it completely replaces the wx sqlite table.
https://github.com/sidstamm/energymonitor/blob/6a4bf8d8c8f015fc4952f101fb0e72ef543366e0/probes/getweatherintodb.sh#L23
We should update this so new weather data is added but the old data is only replaced if the newly downloaded data duplicates it. Maybe something like DELETE FROM wx WHERE YEAR=XXX or something.
DELETE FROM wx WHERE YEAR=XXX
Currently when weather data is downloaded and imported to the database, it completely replaces the wx sqlite table.
https://github.com/sidstamm/energymonitor/blob/6a4bf8d8c8f015fc4952f101fb0e72ef543366e0/probes/getweatherintodb.sh#L23
We should update this so new weather data is added but the old data is only replaced if the newly downloaded data duplicates it. Maybe something like
DELETE FROM wx WHERE YEAR=XXX
or something.