From 5ee51daf825d90dfa85cfda0eb4cd8e3877796fd Mon Sep 17 00:00:00 2001 From: Mathis Date: Mon, 15 Jul 2024 11:47:28 +0200 Subject: [PATCH] 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. --- src/schema.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/schema.ts b/src/schema.ts index a449c23..3a9536d 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -69,6 +69,7 @@ export const ProductsTable = pgTable("products", { .varchar("slug_name", { length: 32, }) + .unique() .notNull(), //displayName