mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-04 08:25:57 +00:00
Update query for pg
This commit is contained in:
parent
f00d24c661
commit
6ffa4b707b
1 changed files with 3 additions and 1 deletions
|
@ -707,8 +707,10 @@ class Database {
|
||||||
static sqlHourOffset() {
|
static sqlHourOffset() {
|
||||||
if (Database.dbConfig.type === "sqlite") {
|
if (Database.dbConfig.type === "sqlite") {
|
||||||
return "DATETIME('now', ? || ' hours')";
|
return "DATETIME('now', ? || ' hours')";
|
||||||
} else {
|
} else if (Database.dbConfig.type.endsWith("mariadb")) {
|
||||||
return "DATE_ADD(NOW(), INTERVAL ? HOUR)";
|
return "DATE_ADD(NOW(), INTERVAL ? HOUR)";
|
||||||
|
} else if (Database.dbConfig.type === "postgres") {
|
||||||
|
return "NOW() + INTERVAL '? HOUR'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue