Fix busy binary reinstall and add per-node log viewing.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+7
-2
@@ -75,6 +75,7 @@ CREATE TABLE IF NOT EXISTS nodes (
|
||||
install_mode TEXT NOT NULL DEFAULT 'auto',
|
||||
last_error TEXT NOT NULL DEFAULT '',
|
||||
install_log TEXT NOT NULL DEFAULT '',
|
||||
runtime_log TEXT NOT NULL DEFAULT '',
|
||||
agent_version TEXT NOT NULL DEFAULT '',
|
||||
last_seen_at TIMESTAMPTZ,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
@@ -95,8 +96,12 @@ CREATE TABLE IF NOT EXISTS node_protocols (
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_node_protocols_protocol ON node_protocols(protocol_id);
|
||||
`
|
||||
_, err := db.Exec(schema)
|
||||
return err
|
||||
if _, err := db.Exec(schema); err != nil {
|
||||
return err
|
||||
}
|
||||
// Additive migrations for existing deployments.
|
||||
_, _ = db.Exec(`ALTER TABLE nodes ADD COLUMN IF NOT EXISTS runtime_log TEXT NOT NULL DEFAULT ''`)
|
||||
return nil
|
||||
}
|
||||
|
||||
func SeedAdmin(db *sql.DB, cfg *config.Config) error {
|
||||
|
||||
Reference in New Issue
Block a user