kevscript
kevscript
PPrisma
Created by kevscript on 6/12/2024 in #help-and-questions
Unable to run db push because of introspected inconsistencies with supabase
Hi, I'm working with a postgres database on supabase. After running db pull with a multischema setup (public+auth), I ultimately reverted back to a simple public access and removed all the introspected tables from my schema.prisma. Currently my schema contains a single table unrelated to supabase. I'm trying to db push it but I get an error as follows:
Error: P4002

The schema of the introspected database was inconsistent: The schema of the introspected database was inconsistent: Cross schema references are only allowed when the target schema is listed in the schemas property of your datasource. `public.profiles` points to `auth.users` in constraint `profiles_id_fkey`. Please add `auth` to your `schemas` property and run this command again.
Error: P4002

The schema of the introspected database was inconsistent: The schema of the introspected database was inconsistent: Cross schema references are only allowed when the target schema is listed in the schemas property of your datasource. `public.profiles` points to `auth.users` in constraint `profiles_id_fkey`. Please add `auth` to your `schemas` property and run this command again.
The mentioned tables (auth.users & public.profiles) are not anymore in the schema I'm trying to push. They do still exist in the database. This is what my bare-bone schema looks like.
generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}

model Post {
id String @id @default(cuid())
text String
}
generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}

model Post {
id String @id @default(cuid())
text String
}
Is Prisma keeping track of previous introspections? I'd like prisma to completely forget about any previous connections, if thats the problem. There is no migration files either.
8 replies