Is there currently a way to utilize onUpdate?

Trying to run ON UPDATE NOW() for a last_updated column for whenever the row is changed.
There's an .onUpdateNow() method
FYI, this is not mentioned in the docs anywhere.
Fair It's visible via the method autocompletion though The docs will be improved significantly once we prepare the website
awesome I'll give it a shot!

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
Migrations not working on github actionsAny suggestions to debug this on actions? Is it possible that the database is not created?"The supplied SQL string contains more than one statement" after running "generate:sqlite"I just updated one of my schemas with a few columns and now my project is broken. This is the gener[bug] Some sql statement looks broken when bulk insert```ts await db.insert(users) .values( { name: 'Andrew', createdAt: new Date(), Return first or throwI have a hard time believing this hasn't been asked yet, but my search results have yet to yield anyCan't find meta/_journal.json file when running migrateTrying to run `migrate()` from a lambda function and I can't figure out why it's unable to find the Wrong type on decimalsHello, I have encountered something interesting. The first screenshot shows what I'm inserting into CheckHello there, from this discussion: know you can add `.references()` to set up foreign keys in a table definition, but how do you set jsonb field definition.What's the right way to define a jsonb field? I have a type `type MetaData = {keywords?: string[];}"Extend" tables by other tablesHey all, first of all great work with drizzle. Haven't had the time to play around with it so far. Bmaximum call stack exceededWeird bug where whenever I add a `where` `eq` clause getting maximum call stack exceededDrizzle recommended way to migrate resetApologies if this is a stupid question, I just recently migrated out of prisma and into drizzle. One