본문 바로가기
Database2026년 1월 23일1분 읽기

Drizzle ORM 최신 동향 — Studio, Relations, Push

YS
김영삼
조회 2043
Drizzle ORM 최신 동향 — Studio, Relations, Push

Drizzle Studio

# 로컬에서 DB 관리 GUI 실행
npx drizzle-kit studio
# http://localhost:4983 에서 열기

향상된 관계 쿼리

const usersWithPosts = await db.query.users.findMany({
  with: {
    posts: {
      with: {
        comments: {
          where: (c, { gt }) => gt(c.likes, 10),
          limit: 5,
        },
      },
      orderBy: (p, { desc }) => desc(p.createdAt),
    },
  },
});

Schema Push

# 마이그레이션 파일 없이 직접 DB에 반영
npx drizzle-kit push
# 개발 중 빠른 반복에 유용

댓글 2

시시니어엔지니어(guest)9개월 전
영삼넷 자주 들어옵니다. 항상 좋은 글 감사해요!
백백엔드개발(guest)9개월 전
팀원들한테도 공유했습니다. 감사합니다!
Ctrl+Enter로 등록