fix(api): reconcile better-auth schema with installed better-auth CLI output
The Task 3 schema drifted from what better-auth@1.6.18's CLI generates: it used mode:'timestamp' (epoch seconds) instead of 'timestamp_ms', left verification timestamps nullable, and omitted the default expressions and helper indexes. Regenerated src/db/schema.ts from `@better-auth/cli generate` (authoritative per the plan's version-drift rule) and rebuilt migration 0000 from scratch (no data exists yet). Converted the index callbacks from the CLI's array form to the object form required by drizzle-orm@0.36.4's types. Adds session_userId_idx, account_userId_idx, verification_identifier_idx and the unixepoch defaults. Tests (health, db, auth sign-up/sign-in, /api/me round-trip) all pass; typecheck clean; db:generate reports no pending changes.
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
{
|
||||
"idx": 0,
|
||||
"version": "6",
|
||||
"when": 1781696310538,
|
||||
"tag": "0000_youthful_genesis",
|
||||
"when": 1781697895207,
|
||||
"tag": "0000_stiff_captain_britain",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user