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

follow-up - reverted getDateQuery logic
This commit is contained in:
Mike Cao 2022-07-22 14:18:18 -07:00 committed by GitHub
commit 6f92677f10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@ npm install -g yarn
### Get the source code and install packages ### 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 cd umami
yarn install yarn install
``` ```

View File

@ -3,7 +3,7 @@
"description": "Umami is a simple, fast, website analytics alternative to Google Analytics.", "description": "Umami is a simple, fast, website analytics alternative to Google Analytics.",
"keywords": ["analytics", "charts", "statistics", "web-analytics"], "keywords": ["analytics", "charts", "statistics", "web-analytics"],
"website": "https://umami.is", "website": "https://umami.is",
"repository": "https://github.com/mikecao/umami", "repository": "https://github.com/umami-software/umami",
"addons": ["heroku-postgresql"], "addons": ["heroku-postgresql"],
"env": { "env": {
"HASH_SALT": { "HASH_SALT": {

View File

@ -2,7 +2,7 @@
version: '3' version: '3'
services: services:
umami: umami:
image: ghcr.io/mikecao/umami:postgresql-latest image: ghcr.io/umami-software/umami:postgresql-latest
ports: ports:
- "3000:3000" - "3000:3000"
environment: environment:

View File

@ -21,7 +21,7 @@ export function getDateQuery(field, unit, timezone) {
if (timezone) { if (timezone) {
return `to_char(date_trunc('${unit}', ${field} at time zone '${timezone}'), '${POSTGRESQL_DATE_FORMATS[unit]}')`; 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) { 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 `date_format(convert_tz(${field},'+00:00','${tz}'), '${MYSQL_DATE_FORMATS[unit]}')`;
} }
return `${field}`; return `date_format(${field}, '${MYSQL_DATE_FORMATS[unit]}')`;
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "umami", "name": "umami",
"version": "1.34.0", "version": "1.35.0",
"description": "A simple, fast, privacy-focused alternative to Google Analytics.", "description": "A simple, fast, privacy-focused alternative to Google Analytics.",
"author": "Mike Cao <mike@mikecao.com>", "author": "Mike Cao <mike@mikecao.com>",
"license": "MIT", "license": "MIT",