feat(schema): add unique constraint to slug_name of a product.
A unique constraint has been added to the "slug_name" field in the schema to prevent any duplication. This will ensure data integrity by enforcing uniqueness for each slug_name entry.
This commit is contained in:
parent
c3bac6d348
commit
5ee51daf82
@ -69,6 +69,7 @@ export const ProductsTable = pgTable("products", {
|
||||
.varchar("slug_name", {
|
||||
length: 32,
|
||||
})
|
||||
.unique()
|
||||
.notNull(),
|
||||
|
||||
//displayName
|
||||
|
Loading…
x
Reference in New Issue
Block a user