rembrembdocs

Upgrading to Drizzle v1 RC

This guide assumes familiarity with:

Drizzle release candidate is living on beta branch in drizzle repository and under the beta tag on npm. So to install it you would need to run:

npm i drizzle-orm@beta
npm i -D drizzle-kit@beta
yarn add drizzle-orm@beta
yarn add -D drizzle-kit@beta
pnpm add drizzle-orm@beta
pnpm add -D drizzle-kit@beta
bun add drizzle-orm@beta
bun add -D drizzle-kit@beta

It follows the 1.0.0-beta.x release pattern, so you’ll see versions such as 1.0.0-beta.7, 1.0.0-beta.8, and so on. Release notes for each beta update are available on GitHub releases

Step 1 - Run drizzle-kit up

Linked discussion: https://github.com/drizzle-team/drizzle-orm/discussions/2832

We’ve updated the migrations folder structure by:

These changes eliminate potential Git conflicts with the journal file and simplify the process of dropping or fixing conflicted migrations

In upcoming beta releases, we’ll introduce commutativity checks to help guide you through team migration conflicts, detect possible collisions, and suggest ways to resolve them

Commutativity discussion: https://github.com/drizzle-team/drizzle-orm/discussions/5005

To migrate previous folders to a new format you would need to run

npx drizzle-kit up
yarn drizzle-kit up
pnpm drizzle-kit up
bunx drizzle-kit up

Step 2 - Update validator packages imports

We’ve stopped maintaining separate validator packages (e.g., drizzle-zod, drizzle-valibot) and moved them into the drizzle-orm repo. This consolidates everything into a single package and eliminates the need to manage separate peer dependencies and versioning.

All packages are now available via drizzle-orm imports:

Step 3 - Update Relational Queries to v2

We’ve explained all the RQBv2 changes in detail, along with options for updating your codebase:

Step 3 - Done ✅