Last 12 weeks ยท 2 commits
4 of 6 standards met
Feature hasn't been suggested before. [x] I have verified this feature I'm about to request hasn't been suggested before. Describe the enhancement you want to request Problem When defining relations between columns of incompatible types (e.g., to ), PostgreSQL throws: This commonly occurs with polymorphic-style associations where a single table references multiple parent tables with different ID formats. The foreign key is stored as to accommodate IDs from different sources (bigint, UUID, external string IDs). Example: Notifications referencing multiple entity types with mixed ID formats A notification system that can reference users (bigint), organizations (UUID), and external Stripe customers (string): Proposed solution Allow passing a builder function to / that receives the aliased table and returns custom SQL: Additional use cases An alternative would be to extend the builder with a but using custom SQL allow for other use cases I opened a PR, what do you think of this approach ?
Repository: drizzle-team/drizzle-orm. Description: ORM Stars: 33015, Forks: 1218. Primary language: TypeScript. Languages: TypeScript (98.7%), JavaScript (1.3%). License: Apache-2.0. Homepage: https://orm.drizzle.team Topics: bunjs, mysql, nodejs, orm, postgres, postgresql, sql, sqlite, turso, typescript. Latest release: drizzle-kit@0.31.9 (2w ago). Open PRs: 100, open issues: 1485. Last activity: 1d ago. Community health: 87%. Top contributors: AndriiSherman, dankochetov, L-Mario564, AlexBlokh, Sukairo-02, Angelelz, AleksandrSherman, OleksiiKH0240, RomanNabukhotnyi, realmikesolo and others.
TypeScript
Report hasn't been filed before. [x] I have verified that the bug I'm about to report hasn't been filed before. What version of are you using? 1.0.0-beta.14-a36c63d What version of are you using? 1.0.0-beta.14-a36c63d Other packages _No response_ Describe the Bug Using Drizzle with Supabase. After migrating to the v3 folder structure, running migrations against my database fail because it's trying to run them from the beginning. i.e. irrelevant migrations to tables from years ago that no longer exist are trying to be run again which obviously fail. I see which tracks DB migrations has an field, which is just the index of the migration. Obviously, migrations are not indexed anymore. Is this the reason?
Originally implemented by copilot in my fork at https://github.com/NickCrews/drizzle-orm/pull/2. copilot wrote all of this code, but it looks pretty good to me, and the tests seem sufficient to me. Fixes https://github.com/drizzle-team/drizzle-orm/issues/4074 Adds parameter to PostgreSQL's method for API consistency with SQLite and MySQL. You would need postgres version 18 in order to actually be able to use this. Changes Column Builder () Added optional parameter to Defaults to for backward compatibility SQL Generator () Changed hardcoded to dynamic Applies to both and Schema Serializer** () Reads instead of hardcoding Applies to both table and view serialization Usage Once this is merged, we would need to do a followup PR to update the existing docs page.