Skip to content

beta#263

Draft
0xcadams wants to merge 13 commits intomainfrom
beta
Draft

beta#263
0xcadams wants to merge 13 commits intomainfrom
beta

Conversation

@0xcadams
Copy link
Copy Markdown
Member

@0xcadams 0xcadams commented Mar 27, 2026

This PR is tracking the upcoming drizzle-orm v2 relations and beta releases.

Install this version with:

npm install drizzle-zero@beta drizzle-orm@beta
# or
bun add drizzle-zero@beta drizzle-orm@beta
# or
yarn add drizzle-zero@beta drizzle-orm@beta
# or
pnpm add drizzle-zero@beta drizzle-orm@beta

Feel free to leave comments on this PR.

Pin the workspace to drizzle-orm and drizzle-kit 1.0.0-beta.19 so the repo is aligned on the beta-only migration target. Move drizzle-zero onto a prerelease version to land the breaking change on a dedicated release line.
Centralize beta Drizzle column normalization so the rest of the migration can resolve arrays, enums, and extended data types consistently. This keeps runtime type resolution stable while moving away from legacy column internals.
Move the type-level column mapping onto beta Column metadata so custom types, enums, arrays, and logical Zero defaults are resolved from built columns instead of legacy internals. This keeps the migration aligned across tables and schema type helpers before the runtime table builder switches over.
Route Zero table generation through the beta column helpers so arrays, enums, and SQL fallbacks resolve consistently at runtime. This preserves the existing table-shaping rules while moving the runtime path off legacy Drizzle type assumptions.
Build relationships from beta defineRelations and defineRelationsPart exports so direct and through hops share one normalization path. Drop legacy relations and removed manyToMany config support to align the schema generator with the beta-only release target.
Move the relation fixture suite onto defineRelations and through so the regression coverage matches the beta-only schema format. Remove legacy manyToMany and reverse-inference fixtures to keep the remaining tests focused on the supported relation model.
Move the integration schema and generator paths onto beta defineRelations and through so generated relationships come from the supported Drizzle 1.0 model. Fix the related custom-type regressions for nullable string enums and array-typed jsonb fields so the generated Zero schema stays stable.
Update the README to document the beta-only relation APIs, through-based many-to-many setup, and the removed legacy configuration paths. Add explicit upgrade notes so users can move from legacy relations onto the supported Drizzle beta workflow.
@0xcadams
Copy link
Copy Markdown
Member Author

A new version, drizzle-zero@1.0.0-beta.0, has been published to npm: https://www.npmjs.com/package/drizzle-zero?activeTab=versions

@typedrat
Copy link
Copy Markdown

The PR I was going to submit does some gymnastics to simultaneously support either V1 or V2 tables, if you would like me to link you to the code.

@0xcadams
Copy link
Copy Markdown
Member Author

It became too complex to support both. I wanted that and started down that road, but the code was too complex.

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