Skip to content

Commit

Permalink
Merge pull request #1 from GenieWizards/feat/add-auth
Browse files Browse the repository at this point in the history
refactor: simplify unique index definition in user schema♻️
  • Loading branch information
shivamvijaywargi authored Nov 6, 2024
2 parents 67c7ceb + 6fa2b77 commit e739933
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"dependencies": {
"@hono/zod-openapi": "^0.16.4",
"@scalar/hono-api-reference": "^0.5.158",
"drizzle-orm": "^0.35.3",
"drizzle-orm": "^0.36.0",
"drizzle-zod": "^0.5.1",
"hono": "^4.6.8",
"hono-pino": "^0.3.0",
"hono": "^4.6.9",
"hono-pino": "^0.5.1",
"pino": "^9.5.0",
"postgres": "^3.4.5",
"zod": "^3.23.8"
Expand Down
4 changes: 1 addition & 3 deletions src/db/schema/user.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ const userSchema = pgTable(
.notNull()
.defaultNow(),
},
table => ({
emailUniqueIndex: uniqueIndex().on(lower(table.email)),
}),
table => [uniqueIndex().on(lower(table.email))],
);

// Schema for selecting a user - can be used to validate API responses
Expand Down

0 comments on commit e739933

Please sign in to comment.