feat(coderd/database): add template_usage_stats table and rollup query (#12664)

Add `template_usage_stats` table for aggregating tempalte usage data.
Data is rolled up by the `UpsertTemplateUsageStats` query, which fetches
data from the `workspace_agent_stats` and `workspace_app_stats` tables.
This commit is contained in:
Mathias Fredriksson
2024-03-22 18:33:34 +02:00
committed by GitHub
parent a6b8f381f0
commit 04f0510b09
16 changed files with 1459 additions and 0 deletions

View File

@ -0,0 +1 @@
DROP TABLE template_usage_stats;