diff --git a/src/config/main.go b/src/config/main.go index 9d56ce9..525a72c 100644 --- a/src/config/main.go +++ b/src/config/main.go @@ -56,7 +56,7 @@ func (config *Config) GetConfig() (err error) { ON DUPLICATE KEY UPDATE date=:date,infection=:infection, deces=:deces, guerisons=:guerisons, tauxdeces=:tauxdeces, tauxguerison=:tauxguerison, tauxinfection=:tauxinfection; ` - config.DbMaxDateGlobal = `SELECT IFNULL(MAX(date),"0001-01-01 00:00:00") FROM coronaglobaldata;` + config.DbMaxDateGlobal = `SELECT IFNULL(SUBDATE(MAX(date), INTERVAL 1 DAY), "0001-01-01 00:00:00") FROM coronaglobaldata;` config.DbSchemaPays = ` CREATE TABLE IF NOT EXISTS coronapaysdata @@ -79,7 +79,7 @@ func (config *Config) GetConfig() (err error) { VALUES (:date, :pays, :infection, :deces, :guerisons, :tauxdeces, :tauxguerison, :tauxinfection) ON DUPLICATE KEY UPDATE date=:date, pays=:pays,infection=:infection, deces=:deces, guerisons=:guerisons, tauxdeces=:tauxdeces, tauxguerison=:tauxguerison, tauxinfection=:tauxinfection;` - config.DbMaxDatePays = `SELECT IFNULL(MAX(date),"0001-01-01 00:00:00") FROM coronapaysdata;` + config.DbMaxDatePays = `SELECT IFNULL(SUBDATE(MAX(date), INTERVAL 1 DAY), "0001-01-01 00:00:00") FROM coronapaysdata;` return }