RickDom
RickDom
DTDrizzle Team
Created by RickDom on 7/23/2024 in #help
Is there a way to create a unique constrain on a jsonb column in a table?
OK that is easier than I thought. I think in my initial use case, the unique on the jsonb column should be good enough as those are pretty simple and since it is doing a deep comparison it should be ok. But I think I might have some other usecases with jsonb columns where I think going with the generated column will likely be the best route due to the complexity. Thankst @Raphaël M (@rphlmr) ⚡ and @Niklas !
12 replies
DTDrizzle Team
Created by RickDom on 7/23/2024 in #help
Is there a way to create a unique constrain on a jsonb column in a table?
Thanks, I will take a look at it!
12 replies
DTDrizzle Team
Created by RickDom on 7/23/2024 in #help
Is there a way to create a unique constrain on a jsonb column in a table?
Yeah I was debating about doing this with a generated column. It might be the cleanest route depending on what it is like getting a generated column setup in the drizzle schema
12 replies
DTDrizzle Team
Created by RickDom on 7/23/2024 in #help
Is there a way to create a unique constrain on a jsonb column in a table?
Right, I wondered about that. Is it doing a deep comparison? In my use case it is pretty shallow, but I wonder what the limitation for this would be. 🤔
12 replies