Mario564
Explore posts from serversDTDrizzle Team
•Created by Udlei Nati on 1/6/2025 in #help
Could not find package 'postgres' from referrer 'file:///deno-dir/npm/registry.npmjs.org/drizzle-orm
Don't got any updates on my end. I haven't used Deno extensively so not sure what could be the issue here
4 replies
DTDrizzle Team
•Created by manikandan on 1/7/2025 in #help
Need help with InferSelectModel
Hmm, there are a few other things you can try:
1. Change
target
in your tsconfig.json to be set to a more recent version.
2. Update ORM and Kit to the latest versions9 replies
DTDrizzle Team
•Created by RickRyan26 on 11/27/2024 in #help
Drizzle-zod combined with regular zod? 🙃
@RickRyan26 Not sure if I understand what you're asking for when you say that you want to merge the two, but this could be what you're looking for: https://orm.drizzle.team/docs/zod#factory-functions
4 replies
DTDrizzle Team
•Created by LEGION on 1/2/2025 in #help
Weird SQLite malformed error
You may want to reach out to the Neon Postgres team, seeing as the error occurs within C++ code, it might be a low level issue on their end
7 replies
DTDrizzle Team
•Created by yehtet804 on 1/8/2025 in #help
Drizzle-kit force rename
If you're upgrading from an older version of Drizzle ORM and Kit, you may need to manually update the generated migration file since there may have been breaking changes in between versions
5 replies
DTDrizzle Team
•Created by yehtet804 on 1/8/2025 in #help
Drizzle-kit force rename
That seems like a different issue, seeing as I can't see any
product
table in the sceenshot you sent5 replies
DTDrizzle Team
•Created by NotLuksus on 12/29/2024 in #help
Typescript doesnt autocomplete columns on table
@NotLuksus Hey there, still having this issue? Could you show me the type of
sourceDocumentTable
by hovering over it in your editor?2 replies
DTDrizzle Team
•Created by yehtet804 on 1/8/2025 in #help
Drizzle-kit force rename
@yehtet804 The generate command should be used in dev and then committed in your repo so you can then use the migrate command without getting prompted for anything
5 replies
DTDrizzle Team
•Created by manikandan on 1/7/2025 in #help
Need help with InferSelectModel
Hmm, you may also need to set
strict
to true
. Try that/9 replies
DTDrizzle Team
•Created by Cody Oakes on 1/7/2025 in #help
Generated Postgres Column adding together other columns that may have null values
Also why doesn't it work with table names?Not entirely sure, apparently it's something to do with how Postgres handles references, scopes or something like that
14 replies
DTDrizzle Team
•Created by Cody Oakes on 1/7/2025 in #help
Generated Postgres Column adding together other columns that may have null values
You think I can remove the table name from the schema file and drizzle will produce the migration that way?You can try doing this: Not as elegant but it does (or at least should) work.
14 replies
DTDrizzle Team
•Created by Cody Oakes on 1/7/2025 in #help
Generated Postgres Column adding together other columns that may have null values
Want to try something. In the
generated always as
expression, remove the table name before each column name ("supply_item"."location1_quantity"
-> "location1_quantity"
)14 replies
DTDrizzle Team
•Created by Cody Oakes on 1/7/2025 in #help
Generated Postgres Column adding together other columns that may have null values
How does the generated migration look like after this change?
14 replies
DTDrizzle Team
•Created by Cody Oakes on 1/7/2025 in #help
Generated Postgres Column adding together other columns that may have null values
Looks like it's written correctly
14 replies
DTDrizzle Team
•Created by Cody Oakes on 1/7/2025 in #help
Generated Postgres Column adding together other columns that may have null values
@Cody Oakes You can use Postgres'
coalesce
function, which takes the last non-null value in a set that you provide:
14 replies
DTDrizzle Team
•Created by lewisedc on 1/7/2025 in #help
Is there any way to have a subquery in an insert statement?
Subqueries aren't supported as insert values; however, wrapping it with the
sql
operator makes it of type SQL
which is valid4 replies
DTDrizzle Team
•Created by tcurdt on 1/7/2025 in #help
DB and Transaction types
Not sure what to make of it, it seems like your editor isn't providing the full error, as it should look like this:
28 replies
DTDrizzle Team
•Created by tcurdt on 1/7/2025 in #help
DB and Transaction types
Oh, that's strange
28 replies
DTDrizzle Team
•Created by tcurdt on 1/7/2025 in #help
DB and Transaction types
TS should be showing a more detailed error. Could you provide a screenshot of you hovering over the problematic line?
28 replies
DTDrizzle Team
•Created by tcurdt on 1/7/2025 in #help
DB and Transaction types
Need more info on the last code block you gave. It shows what TS expects but doesn't contain what the error itself is
28 replies