Drizzle ORM

Define type-safe schemas and queries for SQLite, PostgreSQL, and MySQL.

17|4|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/oriolrius/pki-manager-web --skill drizzle-orm-oriolrius
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Drizzle ORM
Source: https://github.com/oriolrius/pki-manager-web/tree/main/.claude/skills/drizzle-orm
Command: npx skills add https://github.com/oriolrius/pki-manager-web --skill drizzle-orm-oriolrius

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Type-safe, SQL-friendly data access for TypeScript apps that minimizes boilerplate and runtime errors when building and maintaining a database layer.

Core Features & Use Cases

  • Type-safe schema definitions: Define tables, columns, and relations with strong TypeScript typing.
  • SQL-friendly queries: Build expressive, efficient SQL through a fluent, type-checked API.
  • Migrations & Studio: Manage schema evolution with drizzle-kit and explore data models in Drizzle Studio across SQLite, PostgreSQL, and MySQL.
  • Use Case: Create a robust data layer for a Node.js service with reliable typing and predictable migrations.

Quick Start

Install drizzle-orm and drizzle-kit, define a schema, run migrations, and begin querying with type-safe helpers.

Frequently Asked Questions about Drizzle ORM

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up type-safe database schema definitions in TypeScript?

Define your tables, columns, and relations using Drizzle ORM's strongly typed API to enable type-safe database schema definitions in TypeScript. This ensures predictable migrations and minimizes runtime errors across your data layer.

What is the best way to manage SQL migrations across PostgreSQL and MySQL?

Manage SQL migrations across PostgreSQL and MySQL using drizzle-kit. Install it via npm to control schema evolution and maintain a consistent, scalable data layer across SQLite, PostgreSQL, and MySQL.

How do I build type-safe SQL queries for a Node.js application?

Build type-safe SQL queries for a Node.js application using Drizzle ORM's fluent, type-checked API. This enables you to construct expressive, efficient SQL statements while preventing runtime errors through strong TypeScript typing.

Does Drizzle ORM work with SQLite for TypeScript data access?

Yes, Drizzle ORM works with SQLite alongside PostgreSQL and MySQL. It provides type-safe schema definitions, query construction, relation modeling, and Drizzle Studio integration to streamline data access for TypeScript applications.

Do I need drizzle-kit to run database migrations in TypeScript?

Yes, you need drizzle-kit to manage schema evolution and run database migrations in TypeScript. Installed via npm, it complements drizzle-orm by enabling consistent schema changes and provides Drizzle Studio for data model exploration.

Why use a type-checked SQL API instead of raw SQL for TypeScript apps?

A type-checked SQL API minimizes boilerplate and runtime errors compared to raw SQL for TypeScript apps. It streamlines type-safe database access by ensuring query construction and relation modeling are validated during development.