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
Andrii Sherman
Andrii Sherman17mo ago
No difference second option is useful if you have a composite constraint with multiple columns
Want results from more Discord servers?
Add your server