Add maintenance windows for planned work
This commit is contained in:
3
store.go
3
store.go
@@ -147,6 +147,9 @@ func openStore(path string) (*Store, error) {
|
||||
}
|
||||
// Older databases get this column without requiring a separate migration tool.
|
||||
_, _ = db.Exec(`ALTER TABLE alert_events ADD COLUMN recovery_sent_at INTEGER`)
|
||||
_, _ = db.Exec(`ALTER TABLE alert_events ADD COLUMN planned INTEGER NOT NULL DEFAULT 0`)
|
||||
_, _ = db.Exec(`ALTER TABLE alert_events ADD COLUMN maintenance_reason TEXT NOT NULL DEFAULT ''`)
|
||||
_, _ = db.Exec(`DELETE FROM alert_events WHERE alert_key='monitor-slow'`)
|
||||
_, _ = db.Exec(`ALTER TABLE service_checks ADD COLUMN endpoint TEXT NOT NULL DEFAULT 'public'`)
|
||||
_, _ = db.Exec(`PRAGMA foreign_keys=ON`)
|
||||
return &Store{db: db, path: path}, nil
|
||||
|
||||
Reference in New Issue
Block a user