Sebastian
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Sebastian on 1/4/2024 in #questions
Prisma turborepo deployment not initialized error
Wow, for anybody else who can't read like me, the solution is in the error message.
Find out why and learn how to fix this: https://pris.ly/d/schema-not-found-nextjs
apparently it's a known issue and it's even a workaround plugin from prisma for monorepos.
13 replies
TTCTheo's Typesafe Cult
•Created by Sebastian on 1/4/2024 in #questions
Prisma turborepo deployment not initialized error
yeah, that's how I defined the database package in my monorepo
13 replies
TTCTheo's Typesafe Cult
•Created by Sebastian on 1/4/2024 in #questions
Prisma turborepo deployment not initialized error
They displayed this as an example for how to setup turborepo with prisma
https://turbo.build/repo/docs/handbook/tools/prisma
13 replies
TTCTheo's Typesafe Cult
•Created by Sebastian on 1/4/2024 in #questions
Prisma turborepo deployment not initialized error
So @prisma/client
is only installed in @kleerk/database, and it has an index.ts which does
The basic example on turborepo prisma docs.
Then the initialization is done in the other packages which want to use PrismaClient.
At build time, it depends on a "db:generate" which generates the client and types for prisma
13 replies
TTCTheo's Typesafe Cult
•Created by Sebastian on 1/4/2024 in #questions
Prisma turborepo deployment not initialized error
This is the error displayed in vercel logs.
This is the initialization in the apps/web
The error comes after trying to import prisma in a /pages folder in order to use it in getServerSideProps for doing a check. However, the blocker is the displayed error.
13 replies
TTCTheo's Typesafe Cult
•Created by Sebastian on 1/4/2024 in #questions
Prisma turborepo deployment not initialized error
13 replies
TTCTheo's Typesafe Cult
•Created by Sebastian on 1/4/2024 in #questions
Prisma turborepo deployment not initialized error
I have a package in /packages named database, which exports * from '@prisma/client'
I have setup the package.json right, I can work with the database package locally and while developing, I checked that the client is generated after removing node_modules, bun.lockb and simulate the build process.
13 replies
DTDrizzle Team
•Created by Sebastian on 7/9/2023 in #help
Cannot drop index 'idx': needed in a foreign key constraint
This was the SQL code that was throwing the error:
DROP INDEX
user_id_idx
ON user_profile
;--> statement-breakpoint
ALTER TABLE user_profile
ADD PRIMARY KEY (user_id
);--> statement-breakpoint
ALTER TABLE user_profile
DROP COLUMN id
;--> statement-breakpoint
Changing the order of the statements makes the script run successfully
ALTER TABLE user_profile
DROP COLUMN id
;--> statement-breakpoint
ALTER TABLE user_profile
ADD PRIMARY KEY (user_id
);--> statement-breakpoint
DROP INDEX user_id_idx
ON user_profile
;--> statement-breakpoint2 replies
TTCTheo's Typesafe Cult
•Created by Debaucus on 6/16/2023 in #questions
With Planetscale (or others), what's the correct way to retroactively edit a prod database?
when adding new columns, if you want the column to be not null, you can use the default directive and on a later migration you can remove it if it annoys you with anything, though I wouldn't see the point.
5 replies
TTCTheo's Typesafe Cult
•Created by .traevelliath on 6/22/2023 in #questions
Prisma 2-3 levels deep queries
17 replies
TTCTheo's Typesafe Cult
•Created by .traevelliath on 6/22/2023 in #questions
Prisma 2-3 levels deep queries
Make sure your schema is correctly defined. You can either use self relations or a separate table to manage the friends. If the schema is correctly defined, you should be able to perform the nested includes to get friends of friends
17 replies
TTCTheo's Typesafe Cult
•Created by VIIKKK on 6/1/2023 in #questions
Question about next auth.
sure, feel free to pm me
15 replies
TTCTheo's Typesafe Cult
•Created by VIIKKK on 6/1/2023 in #questions
Question about next auth.
what seems to not work
15 replies
TTCTheo's Typesafe Cult
•Created by VIIKKK on 6/1/2023 in #questions
Question about next auth.
you can also reffer to the official documentation for more details:
https://trpc.io/docs/server/server-side-calls
15 replies
TTCTheo's Typesafe Cult
•Created by VIIKKK on 6/1/2023 in #questions
Question about next auth.
15 replies