Add bootstrap v2, preflight readiness and migration tooling

This commit is contained in:
2026-06-08 08:25:05 +02:00
parent c5c746ff97
commit 817e8ff862
7 changed files with 1133 additions and 26 deletions
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
DB_FILE="/opt/appfactory/data/appfactory/appfactory.db"
python3 - "$DB_FILE" <<'PY'
import sqlite3
import sys
db = sqlite3.connect(sys.argv[1])
db.execute("""
CREATE TABLE IF NOT EXISTS service_health (
id INTEGER PRIMARY KEY AUTOINCREMENT,
service_id TEXT NOT NULL,
status TEXT NOT NULL,
http_status INTEGER,
response_time_ms INTEGER,
error_text TEXT,
checked_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
)
""")
db.execute("""
CREATE INDEX IF NOT EXISTS idx_service_health_service
ON service_health(service_id, checked_at DESC)
""")
db.commit()
db.close()
print("Health migration completed")
PY