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
Thx I'll check it out. Currently I decided to try and pull the data with multischema ON. It pulled the public/auth tables, and then I was able to db push my local models. One thing I'm not sure about is the implications of the warnings mentioning incompatibilities between prisma and supabase's postgres :
/// This table contains check constraints and requires additional setup for migrations. Visit https://pris.ly/d/check-constraints for more info.
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info.
/// This table contains check constraints and requires additional setup for migrations. Visit https://pris.ly/d/check-constraints for more info.
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info.
Would this prevent me from migrating, or would it override the core tables provided by supabase? When I db push-ed, it didn't seem to brake supabase's implementation. I'm able to authenticate in my app. What if I just keep those pulled tables in my schema to make prisma happy, but never edit them? Would it risk altering anything, or slowing me down the road (apart from migrations?)
8 replies
PPrisma
Created by kevscript on 6/12/2024 in #help-and-questions
Unable to run db push because of introspected inconsistencies with supabase
I guess I thought db push would just ignore tables that you don't explicitly define/reference in your local schema. Since I'm not really planning to manage/reference those tables (public.profiles & auth.users) from Prisma, isn't there a way to simply ignore them?
8 replies
PPrisma
Created by kevscript on 6/12/2024 in #help-and-questions
Unable to run db push because of introspected inconsistencies with supabase
My local prisma.schema looks exactly as I described it above. Supabase comes with pre-defined separated schemas (public, auth, ...). I have a profiles table defined in my public supabase schema, that does reference users on supabase auth schema. (public.profiles.id referencesauth.users.id). Its a common setup to expose frontend facing informations for users. When running db push, prisma seems to introspect those tables on my db, but none of them are locally referenced in my schema anymore. The post model isn't relying on other schemas, shouldn't it be pushed just fine?
8 replies