Skip to content

chore(database): upgrade drizzle-orm and drizzle-kit to 1.0.0-rc.5 - #1759

Merged
realcodesiman merged 3 commits into
mainfrom
chore/drizzle-orm-rc5
Nov 25, 2026
Merged

realcodesiman merged 3 commits into
mainfrom
chore/drizzle-orm-rc5

Conversation

@realcodesiman

@realcodesiman realcodesiman commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bump drizzle-orm and drizzle-kit in the pnpm-workspace.yaml catalog from 1.0.0-beta.22 to 1.0.0-rc.5.
  • Vendor relationsFilterToSQL in packages/database/src/relations-filter.ts and drop the casing argument it no longer takes.
  • Stop passing the schema object to drizzle(). Relations are enough.
  • Run drizzle-kit check as part of the database lint script, and remove the obsolete db:fix-chain script.
  • Regenerate the migration snapshot.json files in the rc format. This accounts for most of the diff size and is mechanical.
  • Adapt repository, analytics and test call sites to the rc API.

Test plan

  • pnpm check-types passes for all 26 packages (run by the pre-commit hook)
  • pnpm lint (includes db:check-drift and drizzle-kit check)
  • pnpm test
  • pnpm --filter @chatbotx.io/database test:db
  • Review the snapshot regeneration. The migration SQL itself is unchanged, and db:migrate was not run.

@github-actions github-actions Bot added the chore Maintenance / housekeeping label Nov 22, 2026
Bump the catalog pins from 1.0.0-beta.22 and adapt to the rc API:
- vendor relationsFilterToSQL in relations-filter.ts and drop the
  casing argument it no longer takes
- stop passing the schema object to drizzle(); relations are enough
- run drizzle-kit check as part of the database lint script
- remove the obsolete db:fix-chain script
- regenerate migration snapshots in the rc format
…pshots

Upgrade every migration snapshot to the rc.6 format with drizzle-kit up
(covers the seven migrations added on main) and give the post-comment
test's sub-select mock real SQL chunks, which rc.6 now walks.
…ter wrapper

Guards the drizzle-orm 1.0.0-rc upgrade: db.execute must keep returning
{ rows, rowCount }, and relationsFilterToSQL must keep returning an SQL
instance and dropping undefined values.
@realcodesiman
realcodesiman merged commit 9914fd0 into main Nov 25, 2026
14 checks passed
@realcodesiman
realcodesiman deleted the chore/drizzle-orm-rc5 branch November 25, 2026 15:41
viethung0o0 pushed a commit that referenced this pull request Nov 26, 2026
…orm rc

drizzle-orm 1.0.0-rc throws "Unexpected 'undefined' in filter value" for
any undefined key in a relational `where` (top level or inside `with`);
beta-22 skipped them. Repositories such as flow `buildWhere` leave optional
filters undefined, so opening Flows failed in production after #1759.

Patch the shared relational query builder's findMany/findFirst to strip
undefined values from the config, covering every db.query.* and tx.query.*
call, and add a regression test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance / housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant