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
# 개발 중 빠른 반복에 유용
댓글 0