Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/umami-software/umami into…
Browse files Browse the repository at this point in the history
… dev
  • Loading branch information
franciscao633 committed Dec 16, 2024
2 parents 8f692a1 + bce70c1 commit 67164a7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
15 changes: 8 additions & 7 deletions db/mysql/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
generator client {
provider = "prisma-client-js"
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
}

datasource db {
Expand All @@ -19,10 +20,10 @@ model User {
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamp(0)
deletedAt DateTime? @map("deleted_at") @db.Timestamp(0)
websiteUser Website[] @relation("user")
websiteCreateUser Website[] @relation("createUser")
teamUser TeamUser[]
report Report[]
websiteUser Website[] @relation("user")
websiteCreateUser Website[] @relation("createUser")
teamUser TeamUser[]
report Report[]
@@map("user")
}
Expand Down Expand Up @@ -176,8 +177,8 @@ model Team {
updatedAt DateTime? @updatedAt @map("updated_at") @db.Timestamp(0)
deletedAt DateTime? @map("deleted_at") @db.Timestamp(0)
website Website[]
teamUser TeamUser[]
website Website[]
teamUser TeamUser[]
@@index([accessCode])
@@map("team")
Expand Down
2 changes: 1 addition & 1 deletion db/postgresql/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
}

datasource db {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "umami",
"version": "2.15.0",
"version": "2.15.1",
"description": "A simple, fast, privacy-focused alternative to Google Analytics.",
"author": "Umami Software, Inc. <[email protected]>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function getDateSQL(field: string, unit: string, timezone?: string): string {

if (db === MYSQL) {
if (timezone) {
const tz = formatInTimeZone(new Date(), timezone, 'yyyy-MM-dd HH:mm:ss');
const tz = formatInTimeZone(new Date(), timezone, 'xxx');
return `date_format(convert_tz(${field},'+00:00','${tz}'), '${MYSQL_DATE_FORMATS[unit]}')`;
}
return `date_format(${field}, '${MYSQL_DATE_FORMATS[unit]}')`;
Expand All @@ -90,7 +90,7 @@ function getDateWeeklySQL(field: string, timezone?: string) {
}

if (db === MYSQL) {
const tz = formatInTimeZone(new Date(), timezone, 'yyyy-MM-dd HH:mm:ss');
const tz = formatInTimeZone(new Date(), timezone, 'xxx');
return `date_format(convert_tz(${field},'+00:00','${tz}'), '%w:%H')`;
}
}
Expand Down

0 comments on commit 67164a7

Please sign in to comment.