drizzle

Design portable Drizzle ORM schemas across PostgreSQL, MySQL, and SQLite.

Updated Apr 5, 2023
One-click install
npx skills add https://github.com/fcalell/dotfiles --skill drizzle-fcalell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle
Source: https://github.com/fcalell/dotfiles/tree/main/dot_claude/skills/drizzle
Command: npx skills add https://github.com/fcalell/dotfiles --skill drizzle-fcalell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drizzle ORM schema design to enable portable database schemas across dialects.

Core Features & Use Cases

  • Patterns for table definitions, columns, indexes, relations, and migrations using drizzle-orm
  • Supports multi-tenancy, timestamp fields, and constraints with cascade deletes
  • Use cases include multi-dialect backend services and evolving schemas

Quick Start

Create a multi-tenant, timestamped entity using drizzle-orm syntax with appropriate indexes.

Frequently Asked Questions about drizzle

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

FAQPage Schema
How do I design portable Drizzle ORM schemas across PostgreSQL, MySQL, and SQLite?

Drizzle ORM schema design enables portable database schemas by enforcing type-safe exports, cascade deletes for child tables, and indexed foreign keys. It supports multi-tenant data modeling, relations, and migrations across PostgreSQL, MySQL, and SQLite.

What is the best way to handle cascade deletes for child tables in Drizzle ORM?

Handling cascade deletes for child tables in Drizzle ORM requires enforcing specific schema constraints during design. This Skill applies cascade delete rules to child tables, ensuring relational data integrity when parent records are removed across PostgreSQL, MySQL, and SQLite.

Can I use Drizzle ORM for multi-tenant data modeling across different SQL dialects?

Yes, you can use Drizzle ORM for multi-tenant data modeling across different SQL dialects. It provides schema design patterns that support multi-tenancy, timestamp fields, and constraints, ensuring portability across PostgreSQL, MySQL, and SQLite backends.

How do I store flexible attributes in a portable Drizzle ORM database schema?

To store flexible attributes in a portable Drizzle ORM database schema, use JSON-as-text storage. This approach allows flexible schema evolution while maintaining type-safe exports and consistent data structures across PostgreSQL, MySQL, and SQLite dialects.

Does Drizzle ORM support type-safe exports for evolving database schemas and migrations?

Yes, Drizzle ORM supports type-safe exports for evolving database schemas and migrations. It enforces type-safe schema definitions with indexed foreign keys and relations, ensuring reliable migrations as your backend service scales across multiple SQL dialects.