The one with date column example was my favorite! Which example was your favorite? Do you have other ways you are utilizing check constraints? Let us know in the comments 👇
I liked those simple and clean exemples. But for the enums part, while what you have shown seems convenient from a migration point of view, you loose the generated typings no?
Yes, that is one thing you lose, but it's not that hard to modify your generated Typescript file to add those types manually. Also, if you prefer to just keep using enums, that is totally fine too.
@@dshukertjrI also would put my constraints in my code, so a user will get the right message in the right text box while adding data, instead of throwing a db exception on submit
The one with date column example was my favorite! Which example was your favorite? Do you have other ways you are utilizing check constraints? Let us know in the comments 👇
Holy cow... I can't believe this kind of content is coming from the actual team that is making the software/service. Keep up the great work!
A lot more Postgres content coming from the Supabase team 💪
Right? This is rare. We appreciate
❤❤❤
I liked those simple and clean exemples.
But for the enums part, while what you have shown seems convenient from a migration point of view, you loose the generated typings no?
Yes, that is one thing you lose, but it's not that hard to modify your generated Typescript file to add those types manually. Also, if you prefer to just keep using enums, that is totally fine too.
Thanks for the video, i learn a lot from them... Keep it up please! Kudo's on the quality, really good!
Glad to hear it's helping you out! I'm also learning a lot through creating these videos! Thanks for such a nice comment!
Perfectly timed. I was only wondering last night whether I should add enums for my Web app or use constraints
Right on time!
Love the content. It should be said that not everything needs to be constrained at the DB level. It’s not extensible.
Every usecase has a different solution for sure, and every solution has its pros and cons. What do you mean extensible here?
@@dshukertjrI also would put my constraints in my code, so a user will get the right message in the right text box while adding data, instead of throwing a db exception on submit
@@MennoB-sk8tv Yeah, you should always add the same constraint on your frontend code for maximum user experience!
@@dshukertjr yes cbut i would like to write things just once for maintainability
Very interesting! Thanks
Keeping the rules in the sql datastore. This makes me happy.
Man, I love postgresql.
Super useful! Thank you! 🙌🏾
Glad to hear that you liked it!
Check for enums is best
ts support pls
For the enum?
@@Supabase Nah, for the check constraints. (type gen)