feat(coderd): support weekly aggregated insights (#9684)

This commit is contained in:
Marcin Tojek
2023-09-19 13:06:19 +02:00
committed by GitHub
parent b358e3d558
commit b0e3daa120
15 changed files with 680 additions and 24 deletions

View File

@ -7518,7 +7518,7 @@ func (q *sqlQuerier) UpdateWorkspaceAgentStartupByID(ctx context.Context, arg Up
}
const deleteOldWorkspaceAgentStats = `-- name: DeleteOldWorkspaceAgentStats :exec
DELETE FROM workspace_agent_stats WHERE created_at < NOW() - INTERVAL '30 days'
DELETE FROM workspace_agent_stats WHERE created_at < NOW() - INTERVAL '6 months'
`
func (q *sqlQuerier) DeleteOldWorkspaceAgentStats(ctx context.Context) error {