Skip to content

Drizzle#472

Merged
cm-ayf merged 26 commits intomainfrom
drizzle
Feb 22, 2026
Merged

Drizzle#472
cm-ayf merged 26 commits intomainfrom
drizzle

Conversation

@cm-ayf
Copy link
Copy Markdown
Owner

@cm-ayf cm-ayf commented Dec 30, 2025

closes: #449
closes: #397

@cm-ayf cm-ayf self-assigned this Dec 30, 2025
@vercel
Copy link
Copy Markdown

vercel bot commented Dec 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comiacapay Ready Ready Preview, Comment Feb 22, 2026 4:00pm

@cm-ayf cm-ayf marked this pull request as ready for review February 22, 2026 12:17
Copilot AI review requested due to automatic review settings February 22, 2026 12:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the application's database layer from Prisma ORM to Drizzle ORM, addressing issues #449 (Prisma dependency updates) and #397 (Prisma v7 migration). The migration involves replacing all Prisma client usages with Drizzle equivalents throughout the codebase, including route handlers, middleware, sync utilities, test fixtures, and data migration scripts.

Changes:

  • Replaced Prisma Client with Drizzle ORM for all database operations across the application
  • Migrated database schema from Prisma schema to Drizzle schema with TypeScript definitions
  • Updated all route handlers and API endpoints to use Drizzle query syntax
  • Converted test fixtures and data migration scripts to Drizzle API

Reviewed changes

Copilot reviewed 48 out of 50 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
drizzle/schema.ts New Drizzle schema definitions with table structures and types
drizzle/relations.ts Drizzle relational query definitions for joins
drizzle/index.ts Drizzle client initialization with postgres-js adapter
drizzle.config.ts Drizzle Kit configuration for migrations
drizzle/*/migration.sql Database migration files generated by Drizzle Kit
initial.sql Initial migration setup for Drizzle migrations table
app/lib/db.server.ts Database client exports and orThrow helper extension
app/lib/context.server.ts Updated context from prismaContext to dbContext
app/lib/session.server.ts Migrated session storage from Prisma to Drizzle
app/lib/sync/*.server.ts Updated user/member/guild sync functions to use Drizzle
app/lib/schema.ts Updated type imports from Prisma to Drizzle
app/lib/prisma.server.ts Removed (no longer needed)
app/root.tsx Removed prismaMiddleware, now uses dbContext with default
app/routes/*.ts(x) All route handlers migrated to Drizzle queries
tests/fixtures.ts Test fixtures converted to Drizzle API
scripts/import.ts Data import script converted to Drizzle
scripts/export.ts Data export script converted to Drizzle
scripts/vitex New script runner using Vite
scripts/generateTrampolineKey.ts Added missing crypto import
tsconfig.json Changed to emitDeclarationOnly with outDir
package.json Added drizzle-orm and drizzle-kit dependencies
.prettierignore Added Drizzle snapshot files to ignore list
Comments suppressed due to low confidence (1)

package.json:81

  • The package.json still contains Prisma dependencies (@prisma/adapter-pg, @prisma/client, @prisma/generator-helper, prisma, prisma-json-types-generator) even though the codebase has migrated to Drizzle. These dependencies should be removed as they're no longer used and will unnecessarily increase the bundle size and dependency count.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cm-ayf and others added 3 commits February 22, 2026 21:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cm-ayf cm-ayf merged commit bcfdad3 into main Feb 22, 2026
11 checks passed
@cm-ayf cm-ayf deleted the drizzle branch February 22, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prisma@7 移行

2 participants