Comments (7)
@mavilein @schickling @timsuchanek
Reproduction here: https://github.com/liamdanielduffy/prisma2-postgres-issue-repro
Steps are:
- Install dependencies with
yarn
ornpm install
- Make sure the docker image for postgres is available locally with
docker pull postgres
- In the root of the directory, run
yarn setup-db
ornpm run setup-db
- In the root of the directory, run
prisma2 dev
from prisma.
So the error indicates that the schema param is missing in the connection URL. E.g. this URL is not enough as of now:
postgresql://postgres:password@localhost:5432/db
It would be have to be something like this:
postgresql://postgres:password@localhost:5432/db?schema=my_schema
We could make this parameter optional and default to the public schema in this case. Does that change sound good?
from prisma.
Also ran into this, here are the steps:
- Create a
project.prisma
project.prisma
datasource pg {
provider = "postgres"
url = "file:jack.db"
}
- Run
prisma dev
- Click on http://localhost:5555/
Error: Error in lift engine for rpc listMigrations:
thread 'main' panicked at 'schema param is missing', src/libcore/option.rs:1038:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::_print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::continue_panic_fmt
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::option::expect_failed
9: sql_migration_connector::SqlMigrationConnector::postgres_helper
10: sql_migration_connector::SqlMigrationConnector::exists
11: migration_core::connector_loader::load_connector
12: migration_core::migration_engine::MigrationEngine::init
13: <F as jsonrpc_core::calls::RpcMethodSimple>::call
14: <F as jsonrpc_core::calls::RpcMethod<T>>::call
15: <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll
16: <futures::future::then::Then<A, B, F> as futures::future::Future>::poll
17: <futures::future::map::Map<A, F> as futures::future::Future>::poll
18: <futures::future::either::Either<A, B> as futures::future::Future>::poll
19: futures::task_impl::std::set
20: <std::thread::local::LocalKey<T>>::with
21: futures::future::Future::wait
22: <jsonrpc_core::io::IoHandler<M>>::handle_request_sync
23: migration_core::rpc_api::RpcApi::handle
24: migration_engine::main
25: std::rt::lang_start::{{closure}}
26: std::panicking::try::do_call
27: __rust_maybe_catch_panic
28: std::rt::lang_start_internal
29: main
There is no migrations/
folder currently
from prisma.
Happens on save to the project.prisma
too
from prisma.
This is not actionable right now.
The bug description by @schickling does not show the datasource configuration. Hence no reproduction is possible.
The description by @matthewmueller uses provider postgres with a file url. This should have been rejected at some point. The proper source validation is not implemented yet.
from prisma.
Yes, I think that‘s a great suggestion @mavilein.
@nikolasburk please make sure we also cover this accordingly in our docs.
from prisma.
This got fixed in: 818accd
Will be available through tomorrows release.
from prisma.
Related Issues (20)
- Connect to MongoDB running on a container with a different port than 27017 (on port 27018)
- Prisma crashing my Kubernetes nodes HOT 1
- (Accelerate) gives me an error: `PrismaClient is not configured to run in Cloudflare Workers. In order to run Prisma Client on edge runtime` HOT 1
- `findMany()` not returning correct records HOT 4
- Make `createMany` data type as not empty array instead of array
- gitlab ci failed on docker image node:20 HOT 3
- nested count, aggregate _count query inefficiency HOT 4
- Custom `output` path can only work if it's in `node_modules`
- Auto-creation of related models for required one-to-one relationship with defaults exist
- An empty array is considered null when inserting data into a column with the Int[] type HOT 2
- routines:ssl_choose_client_version:unsupported HOT 3
- Inside the `where` object, the `NOT` field must be last or you can get unexpected results HOT 1
- Support natural ordering for many to many relationship HOT 2
- Filter with every by nullable booleans returns wrong result HOT 2
- SQL Server `ROWGUIDCOL` column with `Unsupported` type HOT 7
- Bug: D1 One-to-Many Relation INSERTs fail with `The required connected records were not found.` when using indices HOT 1
- Bug: Error or bug using Prisma with DriverAdapter with PostgreSQL database Neon HOT 6
- `Entered unreachable code` using an illegal connection string HOT 1
- Could not figure out an ID in create HOT 3
- PANIC: timer has gone away HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma.