From 3cb7fa34b00bf09e751ab0cef87c14afbfe07970 Mon Sep 17 00:00:00 2001 From: rkoh-rq <49420412+rkoh-rq@users.noreply.github.com> Date: Tue, 4 Nov 2025 11:00:33 +0800 Subject: [PATCH 01/56] fix: quote "event" reserved keyword in journey queries Fixes PostgreSQL syntax error by quoting the "event" column alias. This was causing the journey query to fail. "event" is a reserved keyword in PostgreSQL. Added double quotes to treat it as an identifier rather than a keyword. Changes: - Quote "event" in PostgreSQL - Quote "event" in ClickHouse for consistency --- src/queries/sql/reports/getJourney.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/queries/sql/reports/getJourney.ts b/src/queries/sql/reports/getJourney.ts index e831a96d..9d927cfe 100644 --- a/src/queries/sql/reports/getJourney.ts +++ b/src/queries/sql/reports/getJourney.ts @@ -72,7 +72,7 @@ async function relationalQuery( for (let i = 1; i <= steps; i++) { const endQuery = i < steps ? ',' : ''; selectQuery += `s.e${i},`; - maxQuery += `\nmax(CASE WHEN event_number = ${i} THEN event ELSE NULL END) AS e${i}${endQuery}`; + maxQuery += `\nmax(CASE WHEN event_number = ${i} THEN "event" ELSE NULL END) AS e${i}${endQuery}`; groupByQuery += `s.e${i}${endQuery} `; } @@ -118,7 +118,7 @@ async function relationalQuery( select distinct visit_id, referrer_path, - coalesce(nullIf(event_name, ''), url_path) event, + coalesce(nullIf(event_name, ''), url_path) "event", row_number() OVER (PARTITION BY visit_id ORDER BY created_at) AS event_number from website_event where website_id = {{websiteId::uuid}} @@ -182,7 +182,7 @@ async function clickhouseQuery( for (let i = 1; i <= steps; i++) { const endQuery = i < steps ? ',' : ''; selectQuery += `s.e${i},`; - maxQuery += `\nmax(CASE WHEN event_number = ${i} THEN event ELSE NULL END) AS e${i}${endQuery}`; + maxQuery += `\nmax(CASE WHEN event_number = ${i} THEN "event" ELSE NULL END) AS e${i}${endQuery}`; groupByQuery += `s.e${i}${endQuery} `; } @@ -227,7 +227,7 @@ async function clickhouseQuery( WITH events AS ( select distinct visit_id, - coalesce(nullIf(event_name, ''), url_path) event, + coalesce(nullIf(event_name, ''), url_path) "event", row_number() OVER (PARTITION BY visit_id ORDER BY created_at) AS event_number from website_event where website_id = {websiteId:UUID} From 5ded9abbfe03556108574ee6c0b9c51d46e33d81 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 13 Nov 2025 19:42:04 -0800 Subject: [PATCH 02/56] Added data-fetch-credentials attribute. Closes #3644 --- package.json | 4 ++-- pnpm-lock.yaml | 10 +++++----- src/tracker/index.js | 5 ++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 82b1be07..fd31320e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "3.0.0", + "version": "3.0.1", "description": "A modern, privacy-focused alternative to Google Analytics.", "author": "Umami Software, Inc. ", "license": "MIT", @@ -78,7 +78,7 @@ "@react-spring/web": "^10.0.3", "@svgr/cli": "^8.1.0", "@tanstack/react-query": "^5.90.5", - "@umami/react-zen": "^0.206.0", + "@umami/react-zen": "^0.207.0", "@umami/redis-client": "^0.29.0", "bcryptjs": "^3.0.2", "chalk": "^5.6.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7e9b49c..c4d0c432 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: ^5.90.5 version: 5.90.5(react@19.2.0) '@umami/react-zen': - specifier: ^0.206.0 - version: 0.206.0(@babel/core@7.28.3)(@types/react@19.2.2)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.2.0)(use-sync-external-store@1.6.0(react@19.2.0)) + specifier: ^0.207.0 + version: 0.207.0(@babel/core@7.28.3)(@types/react@19.2.2)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.2.0)(use-sync-external-store@1.6.0(react@19.2.0)) '@umami/redis-client': specifier: ^0.29.0 version: 0.29.0 @@ -2935,8 +2935,8 @@ packages: resolution: {integrity: sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@umami/react-zen@0.206.0': - resolution: {integrity: sha512-9XM3Oj1akdyuwkMT1SldrJOyrMACP9TLJApZ/9ocmPuET4B7vpPxRoxv8OpEVlBaDw5nmlJfIvefsNMBLt1OQg==} + '@umami/react-zen@0.207.0': + resolution: {integrity: sha512-TUllF5mKQ+IBepIgT0xvJo/bGBEdPDfGiATyjuuxe2/SwO3LDINbmPUSFpWrjxtUaigiEI0JaQsklSLkirEKPg==} '@umami/redis-client@0.29.0': resolution: {integrity: sha512-Jaqh++jskqDB7ny75pfC02OvKp1JTS4asGDsFrRL3qy8sxL3PAl9+/mybCJe4/6vWrXDJKqpgkSfUDJq2bFjyw==} @@ -10697,7 +10697,7 @@ snapshots: '@typescript-eslint/types': 8.46.2 eslint-visitor-keys: 4.2.1 - '@umami/react-zen@0.206.0(@babel/core@7.28.3)(@types/react@19.2.2)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.2.0)(use-sync-external-store@1.6.0(react@19.2.0))': + '@umami/react-zen@0.207.0(@babel/core@7.28.3)(@types/react@19.2.2)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.2.0)(use-sync-external-store@1.6.0(react@19.2.0))': dependencies: '@fontsource/jetbrains-mono': 5.2.8 '@internationalized/date': 3.10.0 diff --git a/src/tracker/index.js b/src/tracker/index.js index 18b3ff89..a9966198 100644 --- a/src/tracker/index.js +++ b/src/tracker/index.js @@ -18,6 +18,7 @@ const _false = 'false'; const _true = 'true'; const attr = currentScript.getAttribute.bind(currentScript); + const website = attr(_data + 'website-id'); const hostUrl = attr(_data + 'host-url'); const beforeSend = attr(_data + 'before-send'); @@ -27,6 +28,8 @@ const excludeSearch = attr(_data + 'exclude-search') === _true; const excludeHash = attr(_data + 'exclude-hash') === _true; const domain = attr(_data + 'domains') || ''; + const credentials = attr(_data + 'fetch-credentials') || 'omit'; + const domains = domain.split(',').map(n => n.trim()); const host = hostUrl || '__COLLECT_API_HOST__' || currentScript.src.split('/').slice(0, -1).join('/'); @@ -165,7 +168,7 @@ 'Content-Type': 'application/json', ...(typeof cache !== 'undefined' && { 'x-umami-cache': cache }), }, - credentials: 'omit', + credentials, }); const data = await res.json(); From a3f32b036d25fd1f9ac22d04d0efa140c53b1452 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Fri, 14 Nov 2025 08:10:13 -0800 Subject: [PATCH 03/56] revert getDateStringSQL for CH --- src/lib/clickhouse.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/clickhouse.ts b/src/lib/clickhouse.ts index 652b9d11..4880e122 100644 --- a/src/lib/clickhouse.ts +++ b/src/lib/clickhouse.ts @@ -51,12 +51,12 @@ function getUTCString(date?: Date | string | number) { return formatInTimeZone(date || new Date(), 'UTC', 'yyyy-MM-dd HH:mm:ss'); } -function getDateStringSQL(field: string, unit: string, timezone?: string) { +function getDateStringSQL(data: any, unit: string = 'utc', timezone?: string) { if (timezone) { - return `formatDateTime(${field}, '${CLICKHOUSE_DATE_FORMATS[unit]}', '${timezone}')`; + return `formatDateTime(${data}, '${CLICKHOUSE_DATE_FORMATS[unit]}', '${timezone}')`; } - return `formatDateTime(${field}, '${CLICKHOUSE_DATE_FORMATS[unit]}')`; + return `formatDateTime(${data}, '${CLICKHOUSE_DATE_FORMATS[unit]}')`; } function getDateSQL(field: string, unit: string, timezone?: string) { From cc8254985b65565da94fd90eef598344f1d33eac Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Fri, 14 Nov 2025 09:11:26 -0800 Subject: [PATCH 04/56] Increase resetWebsite timeout. fix retention bug returning decimal day_number in CH. Closes #3698 --- src/queries/prisma/website.ts | 45 ++++++++++++++----------- src/queries/sql/reports/getRetention.ts | 2 +- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/queries/prisma/website.ts b/src/queries/prisma/website.ts index 5f5404d5..cc5f2e6f 100644 --- a/src/queries/prisma/website.ts +++ b/src/queries/prisma/website.ts @@ -135,26 +135,31 @@ export async function resetWebsite(websiteId: string) { const { client, transaction } = prisma; const cloudMode = !!process.env.CLOUD_MODE; - return transaction([ - client.eventData.deleteMany({ - where: { websiteId }, - }), - client.sessionData.deleteMany({ - where: { websiteId }, - }), - client.websiteEvent.deleteMany({ - where: { websiteId }, - }), - client.session.deleteMany({ - where: { websiteId }, - }), - client.website.update({ - where: { id: websiteId }, - data: { - resetAt: new Date(), - }, - }), - ]).then(async data => { + return transaction( + [ + client.eventData.deleteMany({ + where: { websiteId }, + }), + client.sessionData.deleteMany({ + where: { websiteId }, + }), + client.websiteEvent.deleteMany({ + where: { websiteId }, + }), + client.session.deleteMany({ + where: { websiteId }, + }), + client.website.update({ + where: { id: websiteId }, + data: { + resetAt: new Date(), + }, + }), + ], + { + timeout: 30000, + }, + ).then(async data => { if (cloudMode) { await redis.client.set( `website:${websiteId}`, diff --git a/src/queries/sql/reports/getRetention.ts b/src/queries/sql/reports/getRetention.ts index 15984cd3..d99098c0 100644 --- a/src/queries/sql/reports/getRetention.ts +++ b/src/queries/sql/reports/getRetention.ts @@ -133,7 +133,7 @@ async function clickhouseQuery( user_activities AS ( select distinct website_event.session_id, - (${getDateSQL('created_at', unit, timezone)} - cohort_items.cohort_date) / 86400 as day_number + toInt32((${getDateSQL('created_at', unit, timezone)} - cohort_items.cohort_date) / 86400) as day_number from website_event join cohort_items on website_event.session_id = cohort_items.session_id From cb63e49a9b2d3f5f26f580acba63fca611a1519d Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 14 Nov 2025 15:42:23 -0800 Subject: [PATCH 05/56] Fixed triggered event lookup. Closes #3742. --- .../[websiteId]/(reports)/funnels/FunnelEditForm.tsx | 11 +++++------ .../[websiteId]/(reports)/goals/GoalAddButton.tsx | 3 +-- src/components/common/DateDistance.tsx | 7 ++++++- src/lib/date.ts | 4 ++++ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/app/(main)/websites/[websiteId]/(reports)/funnels/FunnelEditForm.tsx b/src/app/(main)/websites/[websiteId]/(reports)/funnels/FunnelEditForm.tsx index 30976bff..13712f2a 100644 --- a/src/app/(main)/websites/[websiteId]/(reports)/funnels/FunnelEditForm.tsx +++ b/src/app/(main)/websites/[websiteId]/(reports)/funnels/FunnelEditForm.tsx @@ -56,7 +56,7 @@ export function FunnelEditForm({ const defaultValues = { name: data?.name || '', window: data?.parameters?.window || 60, - steps: data?.parameters?.steps || [{ type: 'path', value: '/' }], + steps: data?.parameters?.steps || [{ type: 'path', value: '' }], }; return ( @@ -82,12 +82,10 @@ export function FunnelEditForm({ validate: value => value.length > 1 || 'At least two steps are required', }} > - {({ fields, append, remove, getValues }) => { + {({ fields, append, remove }) => { return ( {fields.map(({ id }: { id: string }, index: number) => { - const type = getValues(`steps.${index}.type`); - return ( @@ -103,7 +101,8 @@ export function FunnelEditForm({ name={`steps.${index}.value`} rules={{ required: formatMessage(labels.required) }} > - {({ field }) => { + {({ field, context }) => { + const type = context.watch(`steps.${index}.type`); return ; }} @@ -118,7 +117,7 @@ export function FunnelEditForm({ })} ); } diff --git a/src/components/common/PageHeader.tsx b/src/components/common/PageHeader.tsx index 6d8c122a..92167888 100644 --- a/src/components/common/PageHeader.tsx +++ b/src/components/common/PageHeader.tsx @@ -50,7 +50,9 @@ export function PageHeader({ )} - {children} + + {children} + ); } From c427c6f54762ffb5a4fe92e495abf371ca254498 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 3 Dec 2025 17:05:14 -0800 Subject: [PATCH 53/56] Fixed replica logic. --- src/lib/prisma.ts | 60 ++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/lib/prisma.ts b/src/lib/prisma.ts index 94970584..06336d3b 100644 --- a/src/lib/prisma.ts +++ b/src/lib/prisma.ts @@ -206,6 +206,10 @@ async function rawQuery(sql: string, data: Record, name?: string): return `$${params.length}${type ?? ''}`; }); + if (process.env.DATABASE_REPLICA_URL && '$replica' in client) { + return client.$replica().$queryRawUnsafe(query, ...params); + } + return client.$queryRawUnsafe(query, ...params); } @@ -296,10 +300,6 @@ function getSchema() { } function getClient() { - if (!process.env.DATABASE_URL) { - return null; - } - const url = process.env.DATABASE_URL; const replicaUrl = process.env.DATABASE_REPLICA_URL; const logQuery = process.env.LOG_QUERY; @@ -307,43 +307,49 @@ function getClient() { const connectionUrl = new URL(url); const schema = connectionUrl.searchParams.get('schema') ?? undefined; - const adapter = new PrismaPg({ connectionString: url.toString() }, { schema }); + const baseAdapter = new PrismaPg({ connectionString: url }, { schema }); - const prisma = new PrismaClient({ - adapter, + const baseClient = new PrismaClient({ + adapter: baseAdapter, errorFormat: 'pretty', ...(logQuery ? PRISMA_LOG_OPTIONS : {}), }); - if (replicaUrl) { - const replicaAdapter = new PrismaPg({ connectionString: replicaUrl.toString() }, { schema }); - - const replicaClient = new PrismaClient({ - adapter: replicaAdapter, - ...(logQuery ? PRISMA_LOG_OPTIONS : {}), - }); - - prisma.$extends( - readReplicas({ - replicas: [replicaClient], - }), - ); + if (logQuery) { + baseClient.$on('query', log); } + if (!replicaUrl) { + log('Prisma initialized'); + globalThis[PRISMA] ??= baseClient; + return baseClient; + } + + const replicaAdapter = new PrismaPg({ connectionString: replicaUrl }, { schema }); + + const replicaClient = new PrismaClient({ + adapter: replicaAdapter, + errorFormat: 'pretty', + ...(logQuery ? PRISMA_LOG_OPTIONS : {}), + }); + if (logQuery) { - prisma.$on('query' as never, log); + replicaClient.$on('query', log); } - log('Prisma initialized'); + const extended = baseClient.$extends( + readReplicas({ + replicas: [replicaClient], + }), + ); - if (!globalThis[PRISMA]) { - globalThis[PRISMA] = prisma; - } + log('Prisma initialized (with replica)'); + globalThis[PRISMA] ??= extended; - return prisma; + return extended; } -const client: PrismaClient = globalThis[PRISMA] || getClient(); +const client = (globalThis[PRISMA] || getClient()) as ReturnType; export default { client, From 2993db14f09754a41aaec953bf7a93cd7ac3cb52 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 3 Dec 2025 19:37:51 -0800 Subject: [PATCH 54/56] Updated README. --- README.md | 29 ++++++++++++++--------------- pnpm-lock.yaml | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index dcc6865f..95bb4330 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,10 @@ A detailed getting started guide can be found at [umami.is/docs](https://umami.i ### Requirements -- A server with Node.js version 18.18 or newer -- A database. Umami supports [PostgreSQL](https://www.postgresql.org/) (minimum v12.14) databases. +- A server with Node.js version 18.18+. +- A PostgreSQL database version v12.14+. -### Get the Source Code and Install Packages +### Get the source code and install packages ```bash git clone https://github.com/umami-software/umami.git @@ -58,7 +58,7 @@ postgresql://username:mypassword@localhost:5432/mydb pnpm run build ``` -_The build step will create tables in your database if you are installing for the first time. It will also create a login user with username **admin** and password **umami**._ +The build step will create tables in your database if you are installing for the first time. It will also create a login user with username **admin** and password **umami**. ### Start the Application @@ -66,37 +66,36 @@ _The build step will create tables in your database if you are installing for th pnpm run start ``` -_By default, this will launch the application on `http://localhost:3000`. You will need to either [proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) requests from your web server or change the [port](https://nextjs.org/docs/api-reference/cli#production) to serve the application directly._ +By default, this will launch the application on `http://localhost:3000`. You will need to either [proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) requests from your web server or change the [port](https://nextjs.org/docs/api-reference/cli#production) to serve the application directly. --- ## 🐳 Installing with Docker -To build the Umami container and start up a Postgres database, run: +Umami provides Docker images as well as a Docker compose file for easy deployment. -```bash -docker compose up -d -``` - -Alternatively, to pull just the Umami Docker image with PostgreSQL support: +Docker image: ```bash docker pull docker.umami.is/umami-software/umami:latest ``` +Docker compose to run Umami with a Postgres database, run: + +```bash +docker compose up -d +``` + --- ## 🔄 Getting Updates -> [!WARNING] -> If you are updating from Umami V2, image "postgresql-latest" is deprecated. You must change it to "latest". -> e.g., rename `docker.umami.is/umami-software/umami:postgresql-latest` to `docker.umami.is/umami-software/umami:latest`. To get the latest features, simply do a pull, install any new dependencies, and rebuild: ```bash git pull pnpm install -pnpm run build +pnpm build ``` To update the Docker image, simply pull the new images and rebuild: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 10eed821..ef3eb1fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -331,7 +331,44 @@ importers: specifier: ^5.9.3 version: 5.9.3 - dist: {} + dist: + dependencies: + chart.js: + specifier: ^4.5.0 + version: 4.5.1 + chartjs-adapter-date-fns: + specifier: ^3.0.0 + version: 3.0.0(chart.js@4.5.1)(date-fns@2.30.0) + colord: + specifier: ^2.9.2 + version: 2.9.3 + jsonwebtoken: + specifier: ^9.0.2 + version: 9.0.2 + lucide-react: + specifier: ^0.542.0 + version: 0.542.0(react@19.2.1) + pure-rand: + specifier: ^7.0.1 + version: 7.0.1 + react-simple-maps: + specifier: ^2.3.0 + version: 2.3.0(prop-types@15.8.1)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + react-use-measure: + specifier: ^2.0.4 + version: 2.1.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + react-window: + specifier: ^1.8.6 + version: 1.8.11(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + serialize-error: + specifier: ^12.0.0 + version: 12.0.0 + thenby: + specifier: ^1.3.4 + version: 1.3.4 + uuid: + specifier: ^11.1.0 + version: 11.1.0 packages: @@ -5058,6 +5095,11 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} + lucide-react@0.542.0: + resolution: {integrity: sha512-w3hD8/SQB7+lzU2r4VdFyzzOzKnUjTZIF/MQJGSSvni7Llewni4vuViRppfRAa2guOsY5k4jZyxw/i9DQHv+dw==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + lucide-react@0.543.0: resolution: {integrity: sha512-fpVfuOQO0V3HBaOA1stIiP/A2fPCXHIleRZL16Mx3HmjTYwNSbimhnFBygs2CAfU1geexMX5ItUcWBGUaqw5CA==} peerDependencies: @@ -12696,6 +12738,10 @@ snapshots: dependencies: yallist: 4.0.0 + lucide-react@0.542.0(react@19.2.1): + dependencies: + react: 19.2.1 + lucide-react@0.543.0(react@19.2.1): dependencies: react: 19.2.1 From 33e927ed1fe04a9b2c8253b5f57f0b64f6bdcb48 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 3 Dec 2025 23:01:22 -0800 Subject: [PATCH 55/56] Bump version 3.0.2. --- biome.json | 8 ++++++++ package.json | 2 +- pnpm-lock.yaml | 48 +---------------------------------------------- src/lib/prisma.ts | 4 +--- 4 files changed, 11 insertions(+), 51 deletions(-) diff --git a/biome.json b/biome.json index 0dec793b..61d094ca 100644 --- a/biome.json +++ b/biome.json @@ -46,6 +46,14 @@ "arrowParentheses": "asNeeded" } }, + "css": { + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf" + } + }, "assist": { "enabled": true, "actions": { diff --git a/package.json b/package.json index e20ae62d..09a69135 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "3.0.1", + "version": "3.0.2", "description": "A modern, privacy-focused alternative to Google Analytics.", "author": "Umami Software, Inc. ", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef3eb1fa..10eed821 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -331,44 +331,7 @@ importers: specifier: ^5.9.3 version: 5.9.3 - dist: - dependencies: - chart.js: - specifier: ^4.5.0 - version: 4.5.1 - chartjs-adapter-date-fns: - specifier: ^3.0.0 - version: 3.0.0(chart.js@4.5.1)(date-fns@2.30.0) - colord: - specifier: ^2.9.2 - version: 2.9.3 - jsonwebtoken: - specifier: ^9.0.2 - version: 9.0.2 - lucide-react: - specifier: ^0.542.0 - version: 0.542.0(react@19.2.1) - pure-rand: - specifier: ^7.0.1 - version: 7.0.1 - react-simple-maps: - specifier: ^2.3.0 - version: 2.3.0(prop-types@15.8.1)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) - react-use-measure: - specifier: ^2.0.4 - version: 2.1.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1) - react-window: - specifier: ^1.8.6 - version: 1.8.11(react-dom@19.2.1(react@19.2.1))(react@19.2.1) - serialize-error: - specifier: ^12.0.0 - version: 12.0.0 - thenby: - specifier: ^1.3.4 - version: 1.3.4 - uuid: - specifier: ^11.1.0 - version: 11.1.0 + dist: {} packages: @@ -5095,11 +5058,6 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - lucide-react@0.542.0: - resolution: {integrity: sha512-w3hD8/SQB7+lzU2r4VdFyzzOzKnUjTZIF/MQJGSSvni7Llewni4vuViRppfRAa2guOsY5k4jZyxw/i9DQHv+dw==} - peerDependencies: - react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - lucide-react@0.543.0: resolution: {integrity: sha512-fpVfuOQO0V3HBaOA1stIiP/A2fPCXHIleRZL16Mx3HmjTYwNSbimhnFBygs2CAfU1geexMX5ItUcWBGUaqw5CA==} peerDependencies: @@ -12738,10 +12696,6 @@ snapshots: dependencies: yallist: 4.0.0 - lucide-react@0.542.0(react@19.2.1): - dependencies: - react: 19.2.1 - lucide-react@0.543.0(react@19.2.1): dependencies: react: 19.2.1 diff --git a/src/lib/prisma.ts b/src/lib/prisma.ts index 06336d3b..64cb870f 100644 --- a/src/lib/prisma.ts +++ b/src/lib/prisma.ts @@ -303,9 +303,7 @@ function getClient() { const url = process.env.DATABASE_URL; const replicaUrl = process.env.DATABASE_REPLICA_URL; const logQuery = process.env.LOG_QUERY; - - const connectionUrl = new URL(url); - const schema = connectionUrl.searchParams.get('schema') ?? undefined; + const schema = getSchema(); const baseAdapter = new PrismaPg({ connectionString: url }, { schema }); From 60271779dea1f9886bdadf5444fc23f86897fa23 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 3 Dec 2025 23:53:22 -0800 Subject: [PATCH 56/56] Fixed Docker build. --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa894ea5..1282fd86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,13 +16,11 @@ COPY --from=deps /app/node_modules ./node_modules COPY . . COPY docker/middleware.ts ./src -ARG DATABASE_TYPE ARG BASE_PATH -ENV DATABASE_TYPE=$DATABASE_TYPE ENV BASE_PATH=$BASE_PATH - ENV NEXT_TELEMETRY_DISABLED=1 +ENV DATABASE_URL="postgresql://user:pass@localhost:5432/dummy" RUN npm run build-docker