Dean Sheather
39bf3ba628
chore: replace GetManagedAgentCount query with aggregate table ( #19636 )
...
- Removes GetManagedAgentCount query
- Adds new table `usage_events_daily` which stores aggregated usage
events by the type and UTC day
- Adds trigger to update the values in this table when a new row is
inserted into `usage_events`
- Adds a migration that adds `usage_events_daily` rows for existing data
in `usage_events`
- Adds tests for the trigger
- Adds tests for the backfill query in the migration
Since the `usage_events` table is unreleased currently, this migration
will do nothing on real deployments and will only affect preview
deployments such as dogfood.
Closes https://github.com/coder/internal/issues/943
2025-08-30 03:39:37 +10:00
..
2025-08-29 15:48:48 +01:00
2025-07-15 14:36:06 +10:00
2023-11-20 19:16:18 +00:00
2025-08-21 16:35:31 +01:00
2025-08-20 10:09:13 -05:00
2025-06-20 13:16:55 -06:00
2022-08-22 15:02:50 -07:00
2025-08-30 03:39:37 +10:00
2025-06-16 16:15:59 -06:00
2025-08-27 16:57:59 +02:00
2025-07-09 01:16:46 +10:00
2025-08-20 23:38:09 +10:00
2024-11-15 12:30:11 -06:00
2025-07-09 08:45:24 -06:00
2025-08-22 16:32:35 +10:00
2024-10-22 09:20:54 -05:00
2024-09-18 21:47:53 +10:00
2025-02-24 12:59:41 -05:00
2025-06-20 13:16:55 -06:00
2025-08-20 23:38:09 +10:00
2025-08-30 03:39:37 +10:00
2025-07-15 15:03:30 +10:00
2025-07-15 15:03:30 +10:00
2025-07-09 08:45:24 -06:00
2025-01-23 12:57:09 -06:00
2025-06-23 10:32:30 +01:00
2025-06-23 10:32:30 +01:00
2025-01-31 12:14:24 -07:00
2025-08-20 23:38:09 +10:00
2025-06-17 17:50:18 -04:00
2025-06-20 13:16:55 -06:00
2024-09-03 09:09:38 +04:00
2024-09-03 09:09:38 +04:00
2025-03-05 22:43:18 +01:00
2025-03-26 01:56:39 -05:00
2024-09-27 14:06:16 -05:00
2025-03-25 15:31:24 -04:00
2025-06-20 13:00:39 -05:00
2025-07-02 15:05:42 +00:00
2025-08-20 23:38:09 +10:00
2025-08-28 15:00:26 +01:00
2025-06-20 13:16:55 -06:00
2025-01-30 14:08:27 -07:00
2024-11-18 14:09:22 +04:00
2024-05-15 09:46:35 -05:00
2025-06-20 13:16:55 -06:00
2025-02-27 10:39:06 -07:00
2025-02-10 09:31:08 -06:00
2025-03-26 01:56:39 -05:00
2025-08-12 11:37:44 -05:00
2025-08-25 07:11:18 -05:00
2025-08-20 23:38:09 +10:00
2024-09-16 19:03:25 -05:00
2025-06-20 13:16:55 -06:00
2024-08-26 13:05:03 -05:00
2025-08-19 11:00:40 +00:00
2025-08-19 11:00:40 +00:00
2024-12-02 20:54:32 +00:00
2025-06-16 16:15:59 -06:00
2025-06-20 13:16:55 -06:00
2025-08-29 10:41:32 +02:00
2025-06-17 09:00:32 -08:00
2024-12-19 00:51:30 +04:00
2025-08-27 16:57:59 +02:00
2025-03-26 01:56:39 -05:00
2025-08-29 15:48:48 +01:00