© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Create unique slugs with $defaultFn - Drizzle Team
DT
Drizzle Team
•
3y ago
•
6 replies
LeFuncq
Create unique slugs with $defaultFn
Hi there
,
Just wanted to know if it was possible to create unique slugs for every user using
$defaultFn
.
My slugs are generated based on another field
's value and must be unique
.
Using defaultFn
, can I access the tables current values
?
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,959
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
defaultFn not nullable
DT
Drizzle Team / help
3y ago
Issue with $defaultFn and Column Typing in SQLite
DT
Drizzle Team / help
16mo ago
Does `.$defaultFn()` support Promises somehow?
DT
Drizzle Team / help
8mo ago
How to create unique lowercase index?
DT
Drizzle Team / help
3y ago