TripleSpeederT
Convex Communityโ€ข3y agoโ€ข
7 replies
TripleSpeeder

Enforce unique?

My data model has a "slug" component so I have readable urls like
/blog/my-new-entry/
instead of
/blog/3fp6dtpeg3rxcxfbexp2cd3r9jp7kxg
. Is there a way to enforce uniqueness of the slugfield on db level?
I know i can use
query(...).unique()
but throwing here is a bit too late ๐Ÿ™‚
Was this page helpful?