Closed Ram-Raghav-S closed 5 hours ago
BTW @jerryy2021 the polymorphic schema approach for BlogPost
and Comment
did not work out. sqlite
does not support enums or checks. So, I went with a similar approach to Tag
.
Related chat that if you want to look into why: https://chatgpt.com/share/671435aa-e3bc-800e-98d2-e8e2b97c53e1
@jerryy2021 nice catch. Ideally I would make it an enum. But since sqlite does not support them, would you say a string or an int is better suited here?
@jerryy2021 nice catch. Ideally I would make it an enum. But since sqlite does not support them, would you say a string or an int is better suited here?
I'm not sure what professional practice is here; is string okay?
I'm not sure what professional practice is here; is string okay?
I think that should be good - just pushed a commit. I will need reapproval because of repository settings though. Thanks!
Summary
Testing
Messed around with basic CRUD in prisma studio and it seemed to work fine.
Review Notes
Most of the 20 files changed are the default ones generated by
create-next-app
.For review, you can focus on
schema.prisma
Jerry and I made some changes to the original schema plan in this process. Here is a diagram of the current schema
Do comment if anything in the new schema looks suspicious, or if any further changes are required