typescript-drizzle-orm
SolidType-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
Quality Score: 87/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
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
API & Backend Listed
api-database-drizzle
Drizzle ORM, queries, migrations
18 Updated 1 weeks ago
agents-inc API & Backend Solid
api-database-typeorm
Decorator-based ORM for TypeScript with Active Record and Data Mapper patterns
18 Updated 1 weeks ago
agents-inc API & Backend Listed
cloudflare-d1
Cloudflare D1 SQLite database with Workers, Drizzle ORM, migrations
0 Updated today
lciacci