Difference in using unique() on the column definition vs the index?
What is the different between using something like
name: varchar('name', { length: 256 }).unique()
vs
(t) => ({
unq: unique().on(t.name),
}));)
1 Reply
No difference
second option is useful if you have a composite constraint
with multiple columns