ORM
Drizzle ORM

Drizzle ORM

Drizzle ORM is a TypeScript ORM for SQL databases designed with maximum type safety in mind. It comes with a drizzle-kit (opens in a new tab) CLI companion for automatic SQL migrations generation. Drizzle ORM is meant to be a library, not a framework. It stays as an opt-in solution all the time at any levels. The ORM's main philosophy is "If you know SQL, you know Drizzle ORM". We follow the SQL-like syntax whenever possible, are strongly typed ground up, and fail at compile time, not in runtime.

Documentation (opens in a new tab)

Dependencies Installed

  • Regular
    • drizzle-orm
    • drizzle-zod
    • @t3-oss/env-nextjs
    • zod@3.21.4
    • postgres
  • Developer
    • drizzle-kit
    • tsx
    • dotenv
    • pg

Files Scaffolded

  • lib/db/index.ts
  • lib/db/migrate.ts
  • drizzle.config.ts

Files Updated

  • .env
  • lib/env.mjs
  • package.json

Note: if you decide to include example mode, the following additional files will be scaffolded:

  • lib/db/schema/computers.ts
  • lib/api/computers/queries.ts
  • lib/api/computers/mutations.ts