Hey guys, I'm trying to use the `@pgRelation` dire...
# orm-help
j
Hey guys, I'm trying to use the
@pgRelation
directive, as described in the docs (https://www.prisma.io/docs/datamodel-and-migrations/introspection-POSTGRES-soi1/#inline-relation-column), in order to deploy prisma for my existing database. I don't want to migrate this existing database, since I have a codebase that relies on the structure as-is. My datamodel looks like this:
Copy code
type AdminUser @pgTable(name: "admin_users") {
  id: ID! @unique
}

type Customer @pgTable(name: "customers") {
  id: ID! @unique
  adminUser: AdminUser! @pgRelation(column: "admin_user_id")
}
But when I try and deploy I see this error:
Copy code
Global
    ✖ Could not find the model table customers in the database
Anyone have any ideas why this might be? That customers table does exist.
Solved - just had to add
schema: public
to my
docker-compose.yml
🙌 1