chrisyalamov
Explore posts from serversDTDrizzle Team
•Created by chrisyalamov on 4/6/2025 in #help
Can't push migrations to Neon from a deno project (DNS error?)
I'm trying to push some migrations to a Neon database.
Config for reference:
Running
deno run --env -A --node-modules-dir npm:drizzle-kit generate --config ./db/drizzle.config.ts
works fine and generates migrations. The following also works:
However, trying to actually push the migrations gives me this:
anyone have any idea why this is happening? 😩
btw, I have tried both the pooled and non-pooled connection strings.2 replies
DTDrizzle Team
•Created by chrisyalamov on 4/5/2025 in #help
Polymorphic relationships using a discriminator column
Hi all,
I'm currently migrating (tbh rebuilding) a project that currently uses Entity Framework.
In the database, we currently have a few polymorphic relationships, represented with a discriminator column. E.g.
LicenseAssignments
has a column LicenseTargetDiscriminator
(which could be something like User
, Organisation
, Document
, etc.) and a column LicenseTargetId
which contains the ID of the resource in its particular table.
(hope that made at least some sense)
In EF, I can use "type hierarchy mapping" with a discriminator column https://learn.microsoft.com/en-us/ef/core/modeling/inheritance, so it can dynamically retrieve the linked records for me (and it knows which tables to pull them from, using the discriminator column).
Is there any way to achieve this (or similar behaviour) in Drizzle?1 replies