#Import in prisma the schemas on supabase

6 messages · Page 1 of 1 (latest)

plush ice
#

Hi guys, i have the profiles and projects tables in public schema and i want know how can i export them in schema.prisma which i have in my project.
Thanks

muted peakBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

summer salmon
#

prisma db pull

plush ice
#

I have this problem:
× Introspecting based on datasource defined in prisma\schema.prisma

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.

#

Resolved

#

Fix:

  • add previewFeatures = ["multiSchema"] to generator client
  • add schemas = ["auth", "public"] to database db
  • copy npx prisma generate and paste it in cmd
  • copy prisma db pull and paste it in cmd
    this will generate the schemas in schema.prisma