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:
@@ -69,6 +69,7 @@ export const ProductsTable = pgTable("products", {
|
||||
.varchar("slug_name", {
|
||||
length: 32,
|
||||
})
|
||||
.unique()
|
||||
.notNull(),
|
||||
|
||||
//displayName
|
||||
|
||||
Reference in New Issue
Block a user