fix drizzle-orm tsc overload errors blocking npm run check #10
Labels
No labels
bug
in-progress
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AuWoMe/Drift#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
After Forgejo Actions reaches the
npm run checkstep for the first time (post-#8 peer-dep fix), the build fails with ~30 TS2349 errors acrossserver/storage.tsandshared/schema.ts:Diagnosis
shared/schema.tsdeclares BOTHpgTableandsqliteTablevariants of every table.server/db.tstypesdbas the union of node-postgres and better-sqlite3 adapters. TypeScript 5.6.3 withdrizzle-orm@^0.39.3cannot reconcile the two signatures for any query builder call.Fix
Branch
fix/9-drizzle-overload(commit8c0dc80) drops the Postgres branch entirely:shared/schema.ts: keep onlysqliteTablevariants; rename*Sqliteduplicates away.server/db.ts: SQLite-only path; honourDATABASE_URLonly when it doesn't look like a postgres URL.script/migrate.ts,drizzle.config.ts,server/test/setup.ts: follow the SQLite-only change.server/storage.ts: ISO-string dates fortextcolumns; default optionalemailto''.server/routes.ts: import the missingRelationship/Actiontypes; coercereq.params.idviaString().server/index.ts: reshape thelogger.error(...)call to fit its(string, string?)signature.Verification
npm run checkexits 0 (was 30+ errors).npm run buildsucceeds (vite + esbuild).npx vitest run: 10/10 tests pass.Resolves the blocker on #7 ("CI always fails").