Files
Epicure/packages/db/package.json
T
Arnaud 2ee99ea463 fix: no user ever had a username, so people search found nobody
Root cause of "still cannot find users": username was optional in
better-auth's schema and no signup form or settings page ever set it,
but search/profile/follow all key on username, not user id. Every
account now gets a unique one auto-generated (from name/email) in the
user.create.before hook — covers email/password and OAuth signups.
Added a one-off db:backfill-usernames script for accounts created
before this fix and ran it against the current database.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-13 17:26:12 +02:00

30 lines
679 B
JSON

{
"name": "@epicure/db",
"version": "0.0.0",
"private": true,
"type": "module",
"main": "./src/index.ts",
"exports": {
".": "./src/index.ts",
"./schema": "./src/schema/index.ts"
},
"scripts": {
"generate": "drizzle-kit generate",
"migrate": "drizzle-kit migrate",
"studio": "drizzle-kit studio",
"seed": "tsx src/seed.ts",
"backfill-usernames": "tsx src/backfill-usernames.ts",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"drizzle-orm": "^0.44.7",
"postgres": "^3.4.7"
},
"devDependencies": {
"@types/node": "^20.19.43",
"drizzle-kit": "^0.31.1",
"tsx": "^4.20.3",
"typescript": "^5.8.3"
}
}