I would recommend you to pass the schema file location while invoking npx prisma db push command.

npx prisma db push --schema='/location/to/schema.prisma'

Also, I would recommend you to run the command from root location of your project.

Here's a reference for db push command.

Answer from Nurul Sundarani on Stack Overflow
Discussions

npx prisma db push error after migrating from Planetscale to Neon
Hello guys! I've recently migrated my database from Planetscale to Neon, the migration was successful, and everything is okay. But once I tried to run npx prisma db push, I got the following output with warnings and error, even If I change nothing in the schema: More on github.com
🌐 github.com
1
1
`npx prisma db push` and `npx prisma migrate` error when there is a table that starts with `_`
Bug description I try to keep a unified style in my database, so I specify a unique name for each table. But when using the implicit many-to-many relation, I get tables that start with _, so I have to name my utility tables with _ at the... More on github.com
🌐 github.com
4
March 22, 2023
stuck while running prisma db push or pull
Question I have a new nuxt project in which I'm trying to connect to my db in supabase, I've installed prisma and initiated it. in the file prisma/schema I've added my test schema, and ... More on github.com
🌐 github.com
7
3
June 5, 2024
db push --force-reset is not creating database if it doesn't exist
Bug description running npx prisma db push --force-reset for a database that does not exist gives me an error instead of creating the database. Environment variables loaded from .env Prisma schema ... More on github.com
🌐 github.com
5
June 3, 2021
🌐
DEV Community
dev.to › geraldmuvengei06 › the-case-of-the-frozen-supabaseprisma-db-push-why-your-migrations-might-be-stuck-75j
The Case of the Frozen Supabase/Prisma db push: Why Your Migrations Might Be Stuck - DEV Community
June 11, 2025 - # Regenerate client npx prisma generate # Attempting to push the schema npx prisma db push --force-reset · The commands just hung, never completing successfully. A simple task becoming a frustrating blocker. ... DIRECT_URL: This is your direct, unpooled connection to the Supabase database. This is what Prisma needs for database migrations and schema pushes.
🌐
GitHub
github.com › prisma › prisma › discussions › 23890
npx prisma db push error after migrating from Planetscale to Neon · prisma/prisma · Discussion #23890
So, fortunately, I tried npx prisma db pull and magically resolved this issue. It completely rewrites my Prisma schema file with relations from the previous data model as follows: ... It basically added maps to the correct relations from the previous data model. And this fixed the error when I do push now.
Author   prisma
🌐
GitHub
github.com › prisma › prisma › issues › 18412
`npx prisma db push` and `npx prisma migrate` error when there is a table that starts with `_` · Issue #18412 · prisma/prisma
March 22, 2023 - Bug description I try to keep a unified style in my database, so I specify a unique name for each table. But when using the implicit many-to-many relation, I get tables that start with _, so I have to name my utility tables with _ at the...
Author   prisma
🌐
DEV Community
dev.to › digitaldrreamer › prisma-db-push-or-pull-stuck-1g4j
Prisma db push or pull stuck? - DEV Community
January 7, 2026 - When working with Prisma and Supabase DB, I got an issue with the Prisma CLI getting stuck during prisma db push and prisma db pull. I eventually for to know that the issue often arises when using a Supabase connection string with the pooled connection (port 6543). For example, running npx prisma ...
Find elsewhere
🌐
GitHub
github.com › prisma › prisma › issues › 7440
db push --force-reset is not creating database if it doesn't exist · Issue #7440 · prisma/prisma
June 3, 2021 - Bug description running npx prisma db push --force-reset for a database that does not exist gives me an error instead of creating the database. Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasou...
Author   prisma
🌐
GitHub
github.com › vercel › next-forge › issues › 382
npx prisma db push -> dangerous · Issue #382 · vercel/next-forge
January 2, 2025 - A couple of items of note: ... Use when: You've made changes to your Prisma schema that only affect the TypeScript types. What it does: Updates the Prisma Client types in your node_modules. No database changes are made. Example: Adding JSDoc comments or changing field names in your schema. Use when: You're in local and making schema changes that affect the database. ... Runs npx prisma db push to apply the migration to your database (CAUTION: may destroy / drop tables).
Author   vercel
🌐
Reddit
reddit.com › r/nextjs › i am using prisma with planetscale but when i use npx prisma db push i have this error . i
r/nextjs on Reddit: i am using Prisma with planetscale but when i use npx prisma db push i have this error . i
September 30, 2023 -

mastan@mastan-Lenovo-ideapad-110-15ISK:~/Desktop/tata/sas$ npx prisma db push

Environment variables loaded from .env

Prisma schema loaded from prisma/schema.prisma

Datasource "db": MySQL database "discord-clone" at "aws.connect.psdb.cloud"

Error: P1001: Can't reach database server at `aws.connect.psdb.cloud`:`3306`

Please make sure your database server is running at `aws.connect.psdb.cloud`:`3306`.

🌐
GitHub
github.com › prisma › prisma › discussions › 23905
bunx/npx/pnpm dlx prisma db push won't finish setup · prisma/prisma · Discussion #23905
Mismatched versions can sometimes cause issues. As suggested in this GitHub comment, try removing your node_modules folder, then run npm install (or bun install in your case) again.
Author   prisma
🌐
Prisma
prisma.io › home › prisma cli reference › prisma cli reference › prisma cli reference
Prisma CLI reference | Prisma Documentation
The --skip-generate flag was removed in Prisma v7. db push no longer runs prisma generate automatically. Run it explicitly if needed. ... The -- argument/ delimiter/ double-dash is available from version 4.15.0 or later.
🌐
GitHub
github.com › prisma › prisma › discussions › 18744
npx prisma db push error? · prisma/prisma · Discussion #18744
April 26, 2023 - npx prisma db push > Downloading Prisma engines for Node-API for rhel-openssl-1.1.x [ ] 0%Error: request to https://binaries.prisma.sh/all_commits/659ef412370fa3b41cd7bf6e94587c1dfb7f67e7/rhel-openssl-1.1.x/libquery_engine.so.node.gz.sha256 failed, reason: connect EINVAL 0.0.254.149:80 - Local (0.0.0.0:0)
Author   prisma
🌐
GitHub
github.com › prisma › prisma › issues › 17053
`pnpx prisma db push` exits with code 1 · Issue #17053 · prisma/prisma
December 28, 2022 - /Users/shivramsambhus/.npm/_logs/2022-12-28T17_18_40_321Z-debug-0.log Error: Command failed with exit code 1: npm install @prisma/client@4.8.0 ERROR Command failed with exit code 1: /Users/shivramsambhus/Library/pnpm/store/v3/tmp/dlx-36791/node_modules/.bin/prisma db push pnpm: Command failed with exit code 1: /Users/shivramsambhus/Library/pnpm/store/v3/tmp/dlx-36791/node_modules/.bin/prisma db push at makeError (/opt/homebrew/Cellar/pnpm/7.12.2/libexec/dist/pnpm.cjs:22289:17) at handlePromise (/opt/homebrew/Cellar/pnpm/7.12.2/libexec/dist/pnpm.cjs:22860:33) at processTicksAndRejections (node:
Author   prisma
🌐
Prisma
prisma.io › home › prototyping your schema › prototyping your schema › prototyping your schema › prototyping your schema
Prototyping your schema | Prisma Documentation
You do not need to control how schema changes impact data. There is no way to orchestrate schema and data migrations—if db push anticipates that changes will result in data loss, you can either accept data loss with the --accept-data-loss option or stop the process.