DrizzleORM v0.30.9 release
Apr 22, 2024

New Features

  • Added setWhere and targetWhere fields to .onConflictDoUpdate() config in SQLite instead of single where field:
await db.insert(employees)
  .values({ employeeId: 123, name: 'John Doe' })
  .onConflictDoUpdate({
    target: employees.employeeId,
    targetWhere: sql`name <> 'John Doe'`,
    set: { name: sql`excluded.name` }
  });
  
await db.insert(employees)
  .values({ employeeId: 123, name: 'John Doe' })
  .onConflictDoUpdate({
    target: employees.employeeId,
    set: { name: 'John Doe' },
    setWhere: sql`name <> 'John Doe'`
  });

Read more about .onConflictDoUpdate() method here.

  • 🛠️ Added schema information to Drizzle instances via db._.fullSchema

Fixes

  • Fixed migrator in AWS Data API

To get started with Drizzle and AWS Data API follow the documentation.