Scriptorium-CSC309 / web

An collaborative online code editor
0 stars 0 forks source link

initialized next project #2

Closed Ram-Raghav-S closed 5 hours ago

Ram-Raghav-S commented 11 hours ago

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 image

Do comment if anything in the new schema looks suspicious, or if any further changes are required

Ram-Raghav-S commented 8 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

Ram-Raghav-S commented 5 hours ago

@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 commented 5 hours ago

@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?

Ram-Raghav-S commented 5 hours ago

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!