postgres-drizzle
Installation
SKILL.md
PostgreSQL + Drizzle ORM
Type-safe database applications with PostgreSQL 17/18 and Drizzle ORM.
Version Check (do this first)
Drizzle's API changed significantly between the stable 0.x line and v1.0. Check
package.json before writing code, because the two relations APIs are incompatible
and must not be mixed:
drizzle-orm version |
Relations API | Query filters |
|---|---|---|
^0.x (npm latest) |
relations() per table, drizzle(client, { schema }) |
where: eq(users.id, id) |
1.0.0-beta.* / 1.0.0-rc.* |
defineRelations() once for all tables, drizzle(client, { relations }) |
where: { id: userId } (object style) |