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:
Mathis H (Avnyr) 2024-07-15 11:47:28 +02:00
parent c3bac6d348
commit 5ee51daf82
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -69,6 +69,7 @@ export const ProductsTable = pgTable("products", {
.varchar("slug_name", { .varchar("slug_name", {
length: 32, length: 32,
}) })
.unique()
.notNull(), .notNull(),
//displayName //displayName