Lots of changes, still more to do

This commit is contained in:
2025-03-27 15:03:43 +00:00
parent 27b862b84b
commit e13b375af7
8 changed files with 198 additions and 0 deletions

View File

@@ -99,5 +99,19 @@ func InitDB(filepath string) *sql.DB {
log.Fatal("❌ Failed to create Users table:", err)
}
createLogTicketMatchingTable := `
CREATE TABLE IF NOT EXISTS log_ticket_matching (
id INTEGER PRIMARY KEY AUTOINCREMENT,
triggered_by TEXT,
run_at DATETIME DEFAULT CURRENT_TIMESTAMP,
tickets_matched INTEGER,
winners_found INTEGER,
notes TEXT
);`
if _, err := db.Exec(createLogTicketMatchingTable); err != nil {
log.Fatal("❌ Failed to create ticket matching log table:", err)
}
return db
}