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", {
|
.varchar("slug_name", {
|
||||||
length: 32,
|
length: 32,
|
||||||
})
|
})
|
||||||
|
.unique()
|
||||||
.notNull(),
|
.notNull(),
|
||||||
|
|
||||||
//displayName
|
//displayName
|
||||||
|
Loading…
x
Reference in New Issue
Block a user