Skip to content

Add Replit compatibility to Drizzle Kit RC4 - #29

Draft
joe-thom wants to merge 4 commits into
joe-thom/drizzle-v1-rc4-syncfrom
joe-thom/drizzle-v1-compat
Draft

joe-thom wants to merge 4 commits into
joe-thom/drizzle-v1-rc4-syncfrom
joe-thom/drizzle-v1-compat

Conversation

@joe-thom

@joe-thom joe-thom commented Jul 17, 2026

Copy link
Copy Markdown

What changed

Expose a small, headless PostgreSQL API on top of the RC4 sync in #28:

  • Introspection through a caller-provided query interface.
  • Explicit interim-schema-to-DDL conversion with conversion errors.
  • A migration planner with fourteen named resolver hooks and non-mutating inputs.
  • CJS, ESM and declaration exports for the internal scoped artifact.
  • Guarded foreign-key drops, including recreation, and correct omission of default/null FK action clauses.

The fork no longer implements a legacy API facade, connection concurrency policy, approval prompts, truncation decisions or application-specific risk classification. Those responsibilities belong to consumers.

Why

Keep the fork small and close to upstream while exposing the planning primitives needed by non-CLI consumers. Changing the internal package name happens only when packing; the upstream workspace package identity remains unchanged.

Verification

  • Eight headless API regression tests passed: introspection, named resolver mapping, rename behavior, rejection propagation, conversion errors, input immutability and FK SQL.
  • TypeScript and changed-file dprint checks passed.
  • Built and packed the candidate. Clean-consumer CommonJS, ESM and strict NodeNext declaration checks passed against the final tarball.
  • Final-tarball database roundtrips passed against PGlite 0.4.6 for simple tables, composite PK/UQ/FK constraints, a mixed ordinary/expression index, and JSON function/array defaults. Each case applied the plan, re-introspected to a zero diff, then applied a genuine change and converged again. This is bounded PGlite evidence, not full PostgreSQL/PostGIS release certification.
  • An earlier broader PostgreSQL run passed 170 of 173 tests. Remaining failures concerned the PGlite FK type-alter limitation, missing POSTGIS_URL and a name_idx collision; this is not a claim that the full PostgreSQL suite is green.
  • Application integration and full database parity acceptance remain separate from the fork API checks.

Stack

Based on joe-thom/drizzle-v1-rc4-sync (#28), including its latest CI workflow update. No publication is performed by this change.

Rollout and rollback

Keep this PR in draft pending review. Package publication is a separate human-controlled step after the prerequisite PRs merge. This change does not execute migrations or change persistent data and can be reverted before publication.

~ written by ⠕ Replit

@joe-thom joe-thom added the zergling-authored Authored by a Zerg zergling label Jul 17, 2026
Merge the updated RC4 sync parent and keep policy outside the fork. Preserve FK drop guards, default actions and immutable plan inputs.

Assisted-by: Replit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zergling-authored Authored by a Zerg zergling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant