If you're using drizzle orm, you'll need to use the sql wrapper, see example below:
id: uuid().primaryKey().default(sql`gen_random_uuid()`),
With sql imported from:
import { sql } from "drizzle-orm";