Add checks/incidents APIs with filters and SLA summary
This commit is contained in:
1 parent
49cd477991
commit
c8de1257ba
3 files changed
+241
No files matched your search
@@ -127,4 +127,10 @@ try {
|
||||
db.prepare("ALTER TABLE checks ADD COLUMN cert_expiry_date TEXT").run();
|
||||
} catch (err) {}
|
||||
|
||||
// Helpful indexes for time-range queries
|
||||
db.exec(`
|
||||
CREATE INDEX IF NOT EXISTS idx_checks_resource_time ON checks(resource_id, checked_at DESC);
|
||||
CREATE INDEX IF NOT EXISTS idx_incidents_resource_time ON incidents(resource_id, started_at DESC);
|
||||
`);
|
||||
|
||||
module.exports = db;
|
||||
Reference in new issue
Block a user