원클릭으로
nx-database
Database management with Drizzle ORM. Use when modifying schemas, running migrations, or working with database operations.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Database management with Drizzle ORM. Use when modifying schemas, running migrations, or working with database operations.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Auth engine rules for QAuth. Use when working with CredentialProvider implementations, token claim generation, the provider registry, or the federation layer. Enforces the pluggable provider pattern and correct token claim behaviour.
OAuth 2.1 / OIDC rules for QAuth. Use when working with authorization endpoints, token flows, PKCE, JWKS, OIDC discovery, or spec compliance (RFC 9700, OIDC Core 1.0). Covers endpoint behaviour, email claim rules, and token security.
Database schema rules for QAuth. Use when working with the identity model, Drizzle ORM, migrations, repositories, or claim resolution. Reflects the CURRENT shipped schema — the identifier-abstraction model (ADR-002, IMPLEMENTED via Epic
Link GitHub issues in parent-child (sub-issue) relationships using GraphQL
Add a GitHub issue to a project board using gh project item-add
Create a new GitHub issue following QAuth project conventions using gh issue create
| name | nx-database |
| description | Database management with Drizzle ORM. Use when modifying schemas, running migrations, or working with database operations. |
Database infrastructure: libs/infra/db
libs/infra/db/
├── src/
│ ├── schema/ # Drizzle schemas
│ ├── migrations/ # SQL migrations
│ ├── scripts/seed.ts # Seeder
│ └── client.ts # Drizzle client
├── drizzle.config.ts
└── project.json
pnpm nx run infra-db:db:generate # Generate migration
pnpm nx run infra-db:db:migrate # Run migrations
pnpm nx run infra-db:db:studio # Drizzle Studio
pnpm nx run infra-db:db:push # Push schema (dev)
pnpm nx run infra-db:db:seed # Seed data
pnpm nx run infra-db:db:drop # Drop tables (DANGER)
# 1. Modify schema in libs/infra/db/src/schema/
# 2. Generate migration
pnpm nx run infra-db:db:generate
# 3. Review migration in libs/infra/db/src/migrations/
# 4. Apply migration
pnpm nx run infra-db:db:migrate
import { pgTable, text, bigint, uuid, jsonb } from 'drizzle-orm/pg-core';
import { uuidv7 } from 'uuidv7';
export const users = pgTable('users', {
// UUIDv7 primary key
id: uuid('id')
.primaryKey()
.$defaultFn(() => uuidv7()),
// BIGINT epoch timestamps
createdAt: bigint('created_at', { mode: 'number' })
.notNull()
.$defaultFn(() => Date.now()),
// JSONB for metadata
metadata: jsonb('metadata').$type<Record<string, unknown>>(),
// Realm for multi-tenancy
realmId: uuid('realm_id').references(() => realms.id),
});
docker compose up -d postgres
docker compose exec postgres psql -U postgres -d qauth
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/qauth