Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prisma relation error - relation "website_event" does not exist #3148

Open
BB-BenBridges opened this issue Jan 3, 2025 · 0 comments
Open

Comments

@BB-BenBridges
Copy link

Describe the Bug

I have followed the documentation to deploy Umami to Vercel. I even used the deploy button so there is very little for me to get wrong. The only thing i tweaked slightly was I appended a schema name to the end of the postgres url e.g. &schema=umami

Everything seems to work fine but when I try to load a sites stats I get Something went wrong notifications in the UI. Looking at the server logs in the Vercel UI I can see some failed API requests. They all mention relation "website_event" does not exist

Inspecting the database it looks like no foreign keys are set:
image

Database

PostgreSQL

Relevant log output

⨯ Error [PrismaClientKnownRequestError]: 
Invalid `prisma.$queryRawUnsafe()` invocation:


Raw query failed. Code: `42P01`. Message: `relation "website_event" does not exist`
    at $n.handleRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:7315)
    at $n.handleAndLogRequestError (/var/task/node_modules/@prisma/client/runtime/library.js:121:6623)
    at $n.request (/var/task/node_modules/@prisma/client/runtime/library.js:121:6307)
    at async l (/var/task/node_modules/@prisma/client/runtime/library.js:130:9633)
    at async g (/var/task/.next/server/pages/api/websites/[websiteId]/metrics.js:1:2963)
    at async z (/var/task/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16764)
    at async U.render (/var/task/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:17472)
    at async aT.runApi (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:2872:44177)
    at async aT.handleCatchallRenderRequest (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:2872:38327)
    at async aT.runImpl (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:2871:12788) {
  code: 'P2010',
  clientVersion: '5.22.0',
  meta: [Object]
}

Which Umami version are you using? (if relevant)

Commit: bce70c1 Version: 2.15.1

Which browser are you using? (if relevant)

Brave

How are you deploying your application? (if relevant)

Vercel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant