Merge pull request #1329 from Maxime-J/mysql-fix

follow-up - reverted getDateQuery logic
This commit is contained in:
Mike Cao authored and GitHub committed 2022-07-22 14:18:18 -07:00
commit 6f92677f10
5 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ npm install -g yarn
### Get the source code and install packages
```
git clone https://github.com/mikecao/umami.git
git clone https://github.com/umami-software/umami.git
cd umami
yarn install
```
+1 -1
View File
@@ -3,7 +3,7 @@
"description": "Umami is a simple, fast, website analytics alternative to Google Analytics.",
"keywords": ["analytics", "charts", "statistics", "web-analytics"],
"website": "https://umami.is",
"repository": "https://github.com/mikecao/umami",
"repository": "https://github.com/umami-software/umami",
"addons": ["heroku-postgresql"],
"env": {
"HASH_SALT": {
+1 -1
View File
@@ -2,7 +2,7 @@
version: '3'
services:
umami:
image: ghcr.io/mikecao/umami:postgresql-latest
image: ghcr.io/umami-software/umami:postgresql-latest
ports:
- "3000:3000"
environment:
+2 -2
View File
@@ -21,7 +21,7 @@ export function getDateQuery(field, unit, timezone) {
if (timezone) {
return `to_char(date_trunc('${unit}', ${field} at time zone '${timezone}'), '${POSTGRESQL_DATE_FORMATS[unit]}')`;
}
return `date_trunc('${unit}', ${field})`;
return `to_char(date_trunc('${unit}', ${field}), '${POSTGRESQL_DATE_FORMATS[unit]}')`;
}
if (db === MYSQL) {
@@ -31,7 +31,7 @@ export function getDateQuery(field, unit, timezone) {
return `date_format(convert_tz(${field},'+00:00','${tz}'), '${MYSQL_DATE_FORMATS[unit]}')`;
}
return `${field}`;
return `date_format(${field}, '${MYSQL_DATE_FORMATS[unit]}')`;
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "umami",
"version": "1.34.0",
"version": "1.35.0",
"description": "A simple, fast, privacy-focused alternative to Google Analytics.",
"author": "Mike Cao <mike@mikecao.com>",
"license": "MIT",