4 Commits

Author SHA1 Message Date
5ee51daf82
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.
2024-07-15 11:47:28 +02:00
32f01ec058
fix(schema): correct order of imports and remove extra spaces
This commit corrects the order of the imports in the schema file by importing 'zod' correctly. It also removes the extra unnecessary white spaces in between the lines for a cleaner code.
2024-07-11 13:55:02 +02:00
1990bedcfd
refactor(schema): Reorganize insert and select schema declarations
This commit reorganizes the insert and select schema declarations for improved readability. The declarations for 'UsersTable', 'ProductsTable', 'StocksTable', and 'CommentsTable' have been moved closer to their respective table schemas.
2024-07-10 10:13:04 +02:00
2aa793c91d
feat(schema): Move and enhance schema definitions
This commit relocates the schema definitions by deleting the existing `drizzle/schema.ts` and creating a new `schema.ts` file. It also enhances these definitions by adding `createInsertSchema` and `createSelectSchema` for each table.
2024-07-09 15:06:18 +02:00