Update column ONLY enabled when column is set as NOT NULL #3666

TL;DR: // Sharing this on Discord to find some help and explanation about the title. After the first problem that started as a discussion on github and not get any attention, I'm trying to reach you guys through discord. Work well on local, dev and probably will work in production, it seems to be a issue because why should I write a schema that is not equal to my db?! Now with pglite it is more incisive and I should write another schema just to fulfill my e2e test. // https://github.com/drizzle-team/drizzle-orm/discussions/3666 Hope someone can help me with that!
GitHub
Update column ONLY enabled when column is set as NOT NULL · drizzle...
This behavior is expected? Because, I'm only enable to set some field like lastLoginAt when .notNull() is setted in schema, but in my case the column should be able to: NULL: when we insert NEW...
1 Reply
neural
neuralOP2d ago
This old issue seems to resolve partially by cast typing the object. [BUG]: Type inference error on db.insert() when applying default values to table columns #2889 https://github.com/drizzle-team/drizzle-orm/issues/2889#issuecomment-2323165751
GitHub
[BUG]: Type inference error on db.insert() when applying default va...
What version of drizzle-orm are you using? 0.33.0 What version of drizzle-kit are you using? 0.24.0 Describe the Bug When trying to insert into a table via db.insert(schema.table).values( {} ), the...
Want results from more Discord servers?
Add your server