shultz🇮🇱
Explore posts from serversDTDrizzle Team
•Created by shultz🇮🇱 on 7/2/2024 in #help
relations.ts alway include column name
Currently drizzle does not include the column name in the introspected relation name in
relations.ts
if only one column references a certain table [tableName]
and not [tableName]_[columnName]
. This makes the naming unstable as in the future when another column that relates to the same table is added, the first relation name stops making sense. Can I configure drizzle to alway include the column name in the relation name?2 replies
DTDrizzle Team
•Created by shultz🇮🇱 on 5/11/2024 in #help
why is relations.ts not generated?
I updated drizzle-kit and run
yet see no relations.ts generated in the out directory. Any ideas?
1 replies
Async execution context
Is there any way I can create a global that is unique to an async operation? I would like to use that for logging operation context. Or maybe just a built in way to get some kind ID of the current operation, as in for each task in the event loop getting a different ID, than I can use regular module context with the ID.
4 replies
setting module scope variable based on module import path
I have a big utilities file with many helper functions, mostly arround html parsing. Many of which take a locale argument ("en-UK"). The importing module knows the locale, so I would like to set globalThis.defaultLocale via the import path, something like import { util } from '/utilities.ts?locale=en-US'. Is it possible without generating the files per locale or invoking some "setDefualtLocale()" function at every importing module?
1 replies
typescript compiler (38.24MB) included in bundle when importing google's npm:schema-dts
Not sure if this is a bug, but I couldn't see how the package imports the compiler.
create a ts file with:
import type { Accommodation } from "npm:schema-dts"
deno info [file.ts]
file.ts
└─┬ npm:[email protected] (857.9KB)
└── npm:[email protected] (38.24MB)
7 replies
DTDrizzle Team
•Created by shultz🇮🇱 on 7/20/2023 in #help
drizzle-kit introspect:pg Invalid input Only "pg" is available options for "--driver"
When attempting to introspect a neon pg db, I get a very cryptic message.
npx drizzle-kit introspect:pg --connectionString=postgres://gbd:[email protected]/neondb
drizzle-kit: v0.19.9 drizzle-orm: v0.27.2 Invalid input Only "pg" is available options for "--driver"
drizzle-kit: v0.19.9 drizzle-orm: v0.27.2 Invalid input Only "pg" is available options for "--driver"
5 replies
xstate - no types imported
import * as xstate from "https://deno.land/x/xstate@[email protected]/src/index.ts";
file is cached, yet no types (restarted language server ext.)
any ideas?
5 replies