Add analytics metrics and failure ingestion

This commit is contained in:
2026-02-05 23:40:18 +03:00
parent aa6ba73bb3
commit 5af1462645
12 changed files with 1130 additions and 5 deletions

View File

@@ -92,6 +92,7 @@ func applyMigrations(db *sql.DB) error {
filepath.Join("migrations", "0003_ingest", "up.sql"),
filepath.Join("migrations", "0004_timeline", "up.sql"),
filepath.Join("migrations", "0005_tickets", "up.sql"),
filepath.Join("migrations", "0006_analytics", "up.sql"),
}
for _, path := range paths {
data, err := os.ReadFile(path)
@@ -125,6 +126,7 @@ func execStatements(db *sql.DB, sqlText string) error {
func cleanupRegistry(db *sql.DB) error {
statements := []string{
"DELETE FROM failure_events",
"DELETE FROM ticket_links",
"DELETE FROM tickets",
"DELETE FROM timeline_events",