typescript-drizzle-orm

Solid

Type-safe SQL with Drizzle ORM in TypeScript. Use when defining database schemas, writing queries, setting up relations, running migrations, or working with PostgreSQL/MySQL/SQLite/Cloudflare D1/Durable Objects data layers.

API & Backend 38 stars 3 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Drizzle ORM Lightweight, type-safe ORM with SQL-like and relational query APIs for PostgreSQL, MySQL, SQLite, Cloudflare D1, and Durable Objects. ## Quick Start (PostgreSQL) ```typescript import { pgTable, serial, text, integer, timestamp, boolean, varchar, uuid, primaryKey, unique, index } from 'drizzle-orm/pg-core' export const users = pgTable('users', { id: serial('id').primaryKey(), name: text('name').notNull(), email: varchar('email', { length: 255 }).notNull().unique(), age: integer('age'), isActive: boolean('is_active').default(true), createdAt: timestamp('created_at').defaultNow().notNull(), updatedAt: timestamp('updated_at').$onUpdate(() => new Date()), }) export const posts = pgTable('posts', { id: serial('id').primaryKey(), title: text('title').notNull(), content: text('content'), authorId: integer('author_id') .notNull() .references(() => users.id, { onDelete: 'cascade' }), createdAt: timestamp('created_at').defaultNow().notNull(), }) ``` See [references/postgresql.md](./references/postgresql.md) for detailed PostgreSQL patterns. ## Quick Start (SQLite/D1) ```typescript import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core' export const users = sqliteTable('users', { id: text('id').primaryKey(), name: text('name').notNull(), email: text('email').notNull(), isActive: integer('is_active', { mode: 'boolean' }).default(true), createdAt: text('created_at').notNull(), }) export con...

Details

Author
martinffx
Repository
martinffx/atelier
Created
6 months ago
Last Updated
5 days ago
Language
TypeScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category