Query history: Cleanup (#48303)
* Query history: Clean up stale history after 14 days * Add unstarring sleanup * Add wraapping * Update sql for mysql database * Update * Remove fmt.Print * Refactor and simplify solution * Update pkg/services/queryhistory/database.go Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> * Adjust SQL to limit number of deleted queries * Add limit enforcmenet to cleanup * Change limit * Update Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
co-authored by
Emil Tullstedt
parent
cd462c5b21
commit
4661c9ca47
@@ -251,6 +251,7 @@ func (ss *SQLStore) RemoveOrgUser(ctx context.Context, cmd *models.RemoveOrgUser
|
||||
"DELETE FROM org_user WHERE org_id=? and user_id=?",
|
||||
"DELETE FROM dashboard_acl WHERE org_id=? and user_id = ?",
|
||||
"DELETE FROM team_member WHERE org_id=? and user_id = ?",
|
||||
"DELETE FROM query_history_star WHERE org_id=? and user_id = ?",
|
||||
}
|
||||
|
||||
for _, sql := range deletes {
|
||||
|
||||
Reference in New Issue
Block a user