mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 14:03:12 +08:00
WIP: building database in knex.js
This commit is contained in:
@@ -212,8 +212,8 @@ class Maintenance extends BeanModel {
|
||||
static getActiveMaintenanceSQLCondition() {
|
||||
return `
|
||||
(
|
||||
(maintenance_timeslot.start_date <= DATETIME('now')
|
||||
AND maintenance_timeslot.end_date >= DATETIME('now')
|
||||
(maintenance_timeslot.start_date <= CURRENT_TIMESTAMP
|
||||
AND maintenance_timeslot.end_date >= CURRENT_TIMESTAMP
|
||||
AND maintenance.active = 1)
|
||||
OR
|
||||
(maintenance.strategy = 'manual' AND active = 1)
|
||||
@@ -228,7 +228,7 @@ class Maintenance extends BeanModel {
|
||||
static getActiveAndFutureMaintenanceSQLCondition() {
|
||||
return `
|
||||
(
|
||||
((maintenance_timeslot.end_date >= DATETIME('now')
|
||||
((maintenance_timeslot.end_date >= CURRENT_TIMESTAMP
|
||||
AND maintenance.active = 1)
|
||||
OR
|
||||
(maintenance.strategy = 'manual' AND active = 1))
|
||||
|
Reference in New Issue
Block a user