DrizzleORM v0.30.8 release
Apr 11, 2024

New Features

import { pgSchema } from 'drizzle-orm/pg-core';

const mySchema = pgSchema('mySchema');
const colors = mySchema.enum('colors', ['red', 'green', 'blue']);

Learn more about Postgres schemas and enums.

Fixes

To get started with Drizzle and D1 follow the documentation.

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'`
  });

Learn more about .onConflictDoUpdate method here.

Learn more about .onConflictDoNothing method here.

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