Markigno
PPrisma
•Created by Markigno on 2/4/2025 in #help-and-questions
postgress migration error
I'm following your instructions for migration (https://www.prisma.io/docs/getting-started/prisma-postgres/upgrade-from-early-access) for Windows.
I set the env variable DATABASE_URL (with SET, export shows an error - set DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=ey..."). Once i set the variable i launch npx @prisma/ppg-tunnel --host 127.0.0.1 --port 5432 i receive the following error
PS C:\Users\MyPC> npx @prisma/ppg-tunnel --host 127.0.0.1 --port 5432
file:///C:/Users/MyPC/AppData/Local/npm-cache/_npx/cdc1c80c7d03f8e1/node_modules/@prisma/ppg-tunnel/dist/index.js:117
throw new Error("No API key found");
^
Error: No API key found
at resolveApiKey (file:///C:/Users/MyPC/AppData/Local/npm-cache/_npx/cdc1c80c7d03f8e1/node_modules/@prisma/ppg-tunnel/dist/index.js:117:15)
at file:///C:/Users/MyPC/AppData/Local/npm-cache/_npx/cdc1c80c7d03f8e1/node_modules/@prisma/ppg-tunnel/dist/index.js:18:17
at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
Node.js v22.13.0
16 replies
PPrisma
•Created by Markigno on 7/2/2024 in #help-and-questions
Mongodb schema update - how to
I looked at the documentation to understand the right way to update the schema for MongoDB.
I'm doing
prisma generate
prima db push
is it the correct way? not able to find documentation
5 replies
PPrisma
•Created by Markigno on 6/26/2024 in #help-and-questions
mongodb not updating schema
I'm using Firebase functions with Mongodb (atlas)
Let's consider I have a schema like that
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
relationMode = "prisma"
}
model User {
id String @id @map("_id")
displayName String? @default("")
email String? @unique}
and I want to update the User model by adding "Mobile".
so the new schema is
model User {
id String @id @map("_id")
displayName String? @default("")
email String? @unique
mobile String? @default("") }
once updated the schema file I proceed with
prisma generate
prisma db push
after the db push (even if I changed the schema) I received the message
The database is already in sync with the Prisma schema.
✔ Generated Prisma Client (v5.15.1) to .\node_modules\@prisma\client in 1.21s
I deployed the new software version but it is not taking the change (I tried many times updating the software to be sure the deployment process saw software change).
I'm forced to delete the functions from Firebase and then, after deployment, it takes the new version of the schema1 replies