Getting default$default does not exist with external db #2795
Comments
I'm trying to deploy to local docker |
@wieseljonas : Can you please share your |
I can but it’s huge! Any information you would like to see? Basically a schema called default$default get created in my db and of course it’s empty. Can’t get it to connect to public. |
I'm not sure this will help. I kind of got this issue before and it about relation name has to be like this document. the name of the relation should be something like
not
|
I'm having the exact same problem connecting Prisma to an existing DB that's managed by Ruby on Rails. Prisma isn't picking up the schema config item version: '3'
services:
prisma:
image: prismagraphql/prisma:1.12
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
databases:
default:
connector: postgres
host: xxx.rds.amazonaws.com
port: '5432'
database: ebdb
schema: public
user: xxx
password: xxx
migrations: false type User @pgTable(name: "users") {
id: Int! @unique
admin: Boolean
authentication_token: String
created_at: DateTime!
current_sign_in_at: DateTime
email: String! @default(value: "")
encrypted_password: String! @default(value: "")
last_sign_in_at: DateTime
remember_created_at: DateTime
reset_password_sent_at: DateTime
reset_password_token: String
sign_in_count: Int! @default(value: 0)
updated_at: DateTime!
}
|
I really think it's because it's trying to run prisma with migrations turned on. Any solution ? I was trying to compare postgraphile, hasura and prisma on our existing db. And prisma is the only which I didn't manage to test :(. |
Same problem here! I've tried everything (local db, docker db, remote db) uggg...
This is the generated Likes tables that was created from the And I agree with @wieseljonas . I think it's because it's trying to look in the So then the big question is, how do make the prisma server work without migrating the database? |
@divyenduz Issue is the same even with the most minimalistic Do you need more details? |
I'm having the same issue, but with Mutations. I have a table under public schema ERROR: relation "default$default.watchlist" does not exist And so I proceed to move my table into the ERROR: relation "public.watchlist" does not exist I'm using 1.14-alpha EDIT: the workaround was to move my table into the "default$default" schema, and remove schema declaration in docker-compose.yml. But this would require other teams that already using that db to change their code |
Related to #2846. |
Still present in Removing the |
I hit this issue too using prisma@1.15.1 It seems that the As @berstend suggested, I removed the |
I also hit this issue in prisma/1.16.4 Exactly same as @jgoux 's description, ie. external database and removing the |
I have the same problem with
|
It seems that the error most commenters mention is that the |
I am using new database flow.
Thanks |
@SarjuHansaliya, using The other reporters in this issue actually use |
II have set migrations to false and delete the schema line, prisma version is 1.16.4 still having this error. Any solution to this ? prisma_1 | org.postgresql.util.PSQLException: ERROR: relation "default$default.manager_keyword" does not exist |
I've been struggling the whole day with this error,
I've gone through kinda everything, still having the same problem :( I fixed this problem |
I had the same error locally. To fix I truncated all data in the "management" folder in Postgres, which contains all of the migration data. Restarting the prisma service and then running "prisma deploy" worked. |
@warrenday That's actually what fixed my problem as well. |
Restarting the docker container worked for me. |
@divyenduz , I can't reproduce the issue with the following docker-compose file: version: '3'
services:
prisma:
image: prismagraphql/prisma:1.23.2
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
# managementApiSecret: my-secret
databases:
default:
connector: postgres
host: host.docker.internal
port: '5432'
user: harshit
password: ''
database: reproduction
schema: public
migrations: false |
I'm closing this since we did some fixes in that area to close more recent issues and this issue has not seen any more recent reports. If you still experience issues on 1.27.3 or higher please let us know. |
I am having the same issue with latest version: Here is the docker-compose.yml file: version: '3' Here is the schema i am using: It deploys successfully without any error but not reflecting any updates. ["org.postgresql.util.PSQLException: ERROR: relation "development.User" does not exist\n\tat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)\n\tat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)\n\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)\n\tat org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)\n\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)\n\tat org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)\n\tat org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:144)\n\tat com.prisma.connector.shared.jdbc.SharedSlickExtensions.$anonfun$changeDatabaseQueryToDBIO$1(SharedSlickExtensions.scala:24)\n\tat com.prisma.connector.shared.jdbc.SharedSlickExtensions.$anonfun$changeDatabaseQueryToDBIO$1$adapted(SharedSlickExtensions.scala:23)\n\tat com.prisma.connector.shared.jdbc.SharedSlickExtensions.$anonfun$jooqToDBIO$1(SharedSlickExtensions.scala:56)\n\tat slick.jdbc.SimpleJdbcAction.run(StreamingInvokerAction.scala:70)\n\tat slick.jdbc.SimpleJdbcAction.run(StreamingInvokerAction.scala:69)\n\tat slick.dbio.DBIOAction$$anon$4.$anonfun$run$3(DBIOAction.scala:239)\n\tat scala.collection.Iterator.foreach(Iterator.scala:937)\n\tat scala.collection.Iterator.foreach$(Iterator.scala:937)\n\tat scala.collection.AbstractIterator.foreach(Iterator.scala:1425)\n\tat scala.collection.IterableLike.foreach(IterableLike.scala:70)\n\tat scala.collection.IterableLike.foreach$(IterableLike.scala:69)\n\tat scala.collection.AbstractIterable.foreach(Iterable.scala:54)\n\tat slick.dbio.DBIOAction$$anon$4.run(DBIOAction.scala:239)\n\tat slick.dbio.DBIOAction$$anon$4.run(DBIOAction.scala:237)\n\tat slick.basic.BasicBackend$DatabaseDef$$anon$2.liftedTree1$1(BasicBackend.scala:275)\n\tat slick.basic.BasicBackend$DatabaseDef$$anon$2.run(BasicBackend.scala:275)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n"] Please let me know how this can be fixed. |
Describe the bug
I've been able to introspect my database and manually tweak my schema and deployment is find
However when running queries I get the following error:
To Reproduce
Steps to reproduce the behavior:
My docker yaml
my prisma yml
Versions (please complete the following information):
OS
: OS X High Sierraprisma1.12
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: