Show notes
Hello there friends. Welcome to June I am thinking about Postgres and
Prisma and that sort of thing a lot lately because I'm working on mywebsite and doing that sort of thing and one tip that I have for you if youever do database sort of things is try to make sorry to make your data as.As restrictive as possible. Early on as as you're trying to make things. So
like make things if you're like, I don't know if there should be a requiredfield or not make it required. If you're this is an enum but we could havethis we could have a lot of different values for this potentially have thefewest number of values possible to get you to the next phase.The reason is because it's a lot easier to later do a migration.That
expands the permissive venous of that schema than going the other directionbecause when you go the other direction, you have to find all of the datarows that don't go into the new schema and update those so that they theyfit.So, for example, if you have a first name field and you decide to make it
optional first and then after you have a bunch of users you come in laterand you decide no no this first name field needs to.Be required. Well, nowyou have to first go and update all of the usernames to be like unknown orsomething before you can do that schema update.And so yeah, just try to when you're starting a new project or when you're
yeah, I guess not even a new project but when you're adding a new model orsomething like that try to be as restrictive as possible early and then youcan loosen things up later when you have more context and you know, whatmakes more sense.So yeah, hopefully that's helpful and interesting. IIt's this is just
personally affected me because I I was really loose at the start of thisproject and then I had to tighten things up and it's kind of annoying. Soanyway, I hope that's interesting helpful. Ah, but a nice day.
