database

Automate Drizzle ORM schema management and migrations for PostgreSQL in TypeScript projects.

1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/oakoss/open-saas-kit --skill database-oakoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database
Source: https://github.com/oakoss/open-saas-kit/tree/main/.claude/skills/database
Command: npx skills add https://github.com/oakoss/open-saas-kit --skill database-oakoss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a ready-to-use integration of Drizzle ORM with PostgreSQL, delivering a type-safe data layer, schema definitions, and migrations that streamline database access in modern TypeScript projects.

Core Features & Use Cases

  • Database client setup: Quick initialization of a Drizzle client with snake_case mapping and centralized schemas.
  • Schema & migrations: Define tables and relations, generate migrations, and apply changes safely.
  • Query patterns: Demonstrates relational queries, inserts, updates, and deletes with type inference for results.

Quick Start

  1. Copy the environment example and configure DATABASE_URL: cp .env.example .env and edit .env.
  2. Ensure PostgreSQL is running (e.g., docker-compose up -d or local instance).
  3. Bootstrap or push the schema: pnpm db:push (or your project-specific migration commands).
  4. Start the development server: pnpm dev.

Frequently Asked Questions about database

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

FAQPage Schema
How do I set up a type-safe PostgreSQL data layer using Drizzle ORM in TypeScript?

To set up a type-safe PostgreSQL data layer with Drizzle ORM, initialize a centralized database client, enforce snake_case column mapping, and define your schema to enable type inference for queries.

What's the best way to manage database schema migrations with Drizzle ORM and PostgreSQL?

Manage Drizzle ORM schema migrations by defining tables and relations in TypeScript, then safely generate and apply changes using project-specific commands like `pnpm db:push` to sync your PostgreSQL schema.

How do I perform relational queries with type inference in a TypeScript PostgreSQL project?

Relational queries with type inference in TypeScript are performed by defining table relations in your Drizzle ORM schema, allowing the centralized client to return fully typed insert, update, and delete results.

Do I need a running PostgreSQL instance to apply schema migrations with Drizzle ORM?

Yes, you need a running PostgreSQL instance configured via a `DATABASE_URL` in your `.env` file before you can apply schema migrations or push updates using Drizzle ORM.

How does snake_case mapping work when using Drizzle ORM with PostgreSQL?

Snake_case mapping in Drizzle ORM automatically translates PostgreSQL snake_case database columns into camelCase properties in your TypeScript schema, ensuring consistent type-safe data access without manual conversion.