Replace concat() with || due to sqlite3 limitation
All checks were successful
Run Tests / run-tests (push) Successful in 59s
Build & Release / build-docker-image (push) Successful in 2m12s
Build & Release / deploy-to-production (push) Successful in 8s

This commit is contained in:
2026-04-25 19:00:44 +02:00
parent cab4ca25ee
commit ddbf567a19

View File

@@ -29,7 +29,7 @@ def get_all_monthly_analytics(end_date:str = 'now'):
group by counter_id, strftime('%m', timestamp), strftime('%Y', timestamp)
)
select
concat(m.m,', ',m.y) as "month",
m.m || ', ' || m.y as "month",
case
when counter_id is null then json_object()
else json_group_object(name, count)
@@ -69,7 +69,7 @@ def get_monthly_analytics(counter_id:int, end_date:str = 'now'):
group by strftime('%m', timestamp), strftime('%Y', timestamp)
)
SELECT
concat(m.m,', ',m.y) as "month",
m.m || ', ' || m.y as "month",
coalesce(s.count, 0) as count
FROM months as m
LEFT JOIN stats as s on s.m = m.m and s.y = m.y