updated queries for incremental data handle

This commit is contained in:
Paul 2020-04-03 00:32:54 +02:00
parent 26dbbc08e1
commit 0d14dc1d23

View File

@ -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
}