Skip to content

Add Drizzle v1 RC support#911

Open
ziahamza wants to merge 3 commits into
powersync-ja:mainfrom
ziahamza:drizzle-v1-beta
Open

Add Drizzle v1 RC support#911
ziahamza wants to merge 3 commits into
powersync-ja:mainfrom
ziahamza:drizzle-v1-beta

Conversation

@ziahamza

@ziahamza ziahamza commented Mar 28, 2026

Copy link
Copy Markdown

Summary

Updates @powersync/drizzle-driver for the Drizzle v1 RC line.

The driver now uses Drizzle's relations + db.query API. Legacy drizzle-orm@0.x compatibility and _query support are intentionally removed for this branch.

Checks

  • pnpm --filter @powersync/common build
  • pnpm --filter @powersync/web build
  • pnpm --filter @powersync/drizzle-driver build
  • PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=... pnpm --filter @powersync/drizzle-driver test --run
  • pnpm --filter @powersync/drizzle-driver test:exports
  • pnpm --filter @powersync/react build
  • pnpm --filter @powersync/node build
  • PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=... pnpm --filter @powersync/react test --run tests/useQuery.test.tsx
  • PATH=/Users/hzia/.local/share/mise/installs/node/24.13.0/bin:$PATH pnpm --filter @powersync/node test --run tests/DrizzleNode.test.ts
  • pnpm build in demos/react-neon-tanstack-query-notes with local package injection

@changeset-bot

changeset-bot Bot commented Mar 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6ae0453

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@powersync/drizzle-driver Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ziahamza ziahamza changed the title [codex] add smaller Drizzle beta support Add Drizzle beta v1 support Mar 28, 2026
@Chriztiaan

Copy link
Copy Markdown
Contributor

Hey @ziahamza, firstly thank you for putting in the effort and making this PR. In terms of an official release, we would prefer to wait for the stable Drizzle 1.0.0 version and then only support that instead of keeping support for 0.x.x versions, to make adoption and maintenance easier on our side.

As an alternative, we could do dev releases off this PR and update it as changes from the upstream Drizzle project trickles down on the way to the v1 release. That would mean the work needed for this current PR includes a changeset entry, and potentially dropping all the backwards compatible code/documentation/tests you have added here. I suspect that might also simplify your implementation if you only had to worry about support v1 instead of backwards compatibility?

@ziahamza

Copy link
Copy Markdown
Author

Hey @ziahamza, firstly thank you for putting in the effort and making this PR. In terms of an official release, we would prefer to wait for the stable Drizzle 1.0.0 version and then only support that instead of keeping support for 0.x.x versions, to make adoption and maintenance easier on our side.

As an alternative, we could do dev releases off this PR and update it as changes from the upstream Drizzle project trickles down on the way to the v1 release. That would mean the work needed for this current PR includes a changeset entry, and potentially dropping all the backwards compatible code/documentation/tests you have added here. I suspect that might also simplify your implementation if you only had to worry about support v1 instead of backwards compatibility?

Yes it will indeed simplify things a lot if we go all into v1 and drop backward compat support! Let me prepare the dev release with the correct change set to get the dev release out for projects already migrating to drizzle v1 beta

paragraphs
};

export const drizzleRelations = defineRelations(drizzleSchema);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a 1-many relationship missing in this change.

/**
* Nullify all nested objects from nullifyMap that are nullable
*/
function applyNullifyMap(

@Chriztiaan Chriztiaan Apr 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of jdoc comments were removed in this file?

@Chriztiaan

Copy link
Copy Markdown
Contributor

Hey @ziahamza. I have made a dev release for this drizzle package work under the following handle:
"@powersync/drizzle-driver":"0.0.0-dev-20260414110516"

I'll keep an eye on Drizzle releases in the near future, feel free to ping me here or on our Discord if you want to coordinate newer releases. Once again thanks a bunch for this work!

ziahamza added 2 commits June 14, 2026 15:28
# Conflicts:
#	packages/drizzle-driver/package.json
#	packages/drizzle-driver/vitest.config.ts
#	packages/node/package.json
#	packages/react/vitest.config.ts
#	pnpm-lock.yaml
@ziahamza ziahamza changed the title Add Drizzle beta v1 support Add Drizzle v1 RC support Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants