feat(maintenance): add maintenance_mode flag, API support, UI toggle; skip alerts during maintenance; rebuild client
This commit is contained in:
1 parent
2329362f09
commit
65fca3d3e3
9 files changed
+88
-16
No files matched your search
@@ -20,6 +20,7 @@ db.exec(`
|
||||
check_interval INTEGER DEFAULT 60000,
|
||||
timeout INTEGER DEFAULT 5000,
|
||||
enabled INTEGER DEFAULT 1,
|
||||
maintenance_mode INTEGER DEFAULT 0,
|
||||
group_id INTEGER REFERENCES groups(id) ON DELETE SET NULL,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
@@ -76,6 +77,15 @@ try {
|
||||
// Column already exists
|
||||
}
|
||||
|
||||
try {
|
||||
db.prepare("ALTER TABLE resources ADD COLUMN maintenance_mode INTEGER DEFAULT 0").run();
|
||||
console.log('[DB] Added maintenance_mode column to resources');
|
||||
} catch (err) {
|
||||
if (err.message.includes('duplicate')) {
|
||||
console.log('[DB] maintenance_mode column already exists');
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
db.prepare("ALTER TABLE resources ADD COLUMN http_keyword TEXT").run();
|
||||
} catch (err) {}
|
||||
|
||||
Reference in new issue
Block a user