[BUG]: drizzle-kit generates incorrect foreign key references to a table from a different schema when using pgSchema
Problem
What version of `drizzle-orm` are you using? 0.26.1 What version of `drizzle-kit` are you using? 0.18.1 Describe the Bug I have this file that has two schemas, `iam` and `chat`. The `iam` scheme has `users` table and `chat` schema has `chatRooms` table. That `chatRooms` table has a foreign key that references the primary key for `users`. [code block] Using `drizzle-kit generate:pg` generates the following sql: [code block] The foreign key references `"chat"."users"("id")` instead of `"iam"."users"("id")`. Expected behavior The migration file generated by `drizzle-kit` should correctly reference table and columns from another schema in foreign keys. Environment & setup Postgres Fedora Linux
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [BUG]: drizzle-kit generates incorrect foreign key references to a table from a different schema when using pgSchema
Any update on this? It's a bit tedious to have to reapply the patch with every update.
Trust Score
6 verifications
- 1
Any update on this? It's a bit tedious to have to reapply the patch with every u
Any update on this? It's a bit tedious to have to reapply the patch with every update.
Validation
Resolved in drizzle-team/drizzle-orm GitHub issue #636. Community reactions: 14 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep