From c0bbcae5d6058304b502059b6de4260358f66708 Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 31 Jul 2026 14:39:36 +0200 Subject: [PATCH] ci: update CI for Drizzle ORM migration - Update CI comments to reference Drizzle ORM + Prisma facade (not legacy Prisma runtime) - Clarify that src/db/schema.ts is committed (no drizzle-kit generate needed in CI) - Update release notes template: 'Prisma 7' -> 'Drizzle ORM' - Rename release 'Generate Prisma Client' section to 'Generate Prisma Type Stubs (Dev Only)' - Note that Prisma type stubs are for facade type-checking only (no runtime engine) --- .gitea/workflows/ci.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 4faa9aaa..821b0e1b 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -43,7 +43,9 @@ jobs: export REDIS_URL="redis://127.0.0.1:6379?connect_timeout=1" export BCRYPT_ROUNDS=4 pnpm install --frozen-lockfile + # Generate Prisma type stubs for facade type-checking (dev only). pnpm prisma:generate + # Run lint + typecheck + tests on the Drizzle-backed codebase. pnpm biome:lint pnpm typecheck pnpm test @@ -139,9 +141,8 @@ jobs: echo "STAGE DATABASE_POOL_SIZE=${DATABASE_POOL_SIZE}" pnpm install --frozen-lockfile - # prisma generate only needs DATABASE_URL to resolve the schema — no live DB connection. - # Use a placeholder so it doesn't fail if .env isn't loaded yet; db:migrate later - # will use the real DATABASE_URL from the live .env symlink. + # Generate Prisma type stubs (for facade type-checking) — no DB connection needed. + # Drizzle schema (src/db/schema.ts) is committed and does not require generation. export DATABASE_URL="mysql://placeholder:please@localhost/placeholder" pnpm prisma:generate unset DATABASE_URL @@ -204,7 +205,7 @@ jobs: rm -rf node_modules mv "${STAGE}/node_modules" node_modules - # Prisma client is gitignored — regenerate into live src/generated. + # Regenerate Prisma type stubs into live src/generated/ (gitignored build artifact). pnpm prisma:generate sudo chown -R "${DEPLOY_USER}:${DEPLOY_GROUP}" "${LIVE}" 2>/dev/null || true @@ -337,7 +338,7 @@ jobs: { echo "# EpicNext-CMS ${VERSION}" echo "" - echo "> Modern, high-performance CMS for Habbo hotel emulators — built on Next.js 16, React 19 and Prisma 7. Integrates with Polaris / Arcturus Morningstar databases." + echo "> Modern, high-performance CMS for Habbo hotel emulators — built on Next.js 16, React 19 and Drizzle ORM. Integrates with Polaris / Arcturus Morningstar databases." echo "" echo "## Menu" echo "- [What is EpicNext-CMS?](#what-is-epicnext-cms)" @@ -396,11 +397,13 @@ jobs: echo "" echo "Edit .env with at minimum: DATABASE_URL, AUTH_SECRET, HOTEL_NAME and APP_URL. See .env.example for RCON, email, Redis, OAuth and PayPal options." echo "" - echo "### 4. Generate Prisma Client" + echo "### 4. Generate Prisma Type Stubs (Dev Only)" echo '```bash' echo "pnpm prisma:generate" echo '```' echo "" + echo "Generates TypeScript types in src/generated/prisma/ for the Prisma compatibility facade (types only — no runtime Prisma engine in production). New code should use Drizzle ORM directly via '@/lib/db'." + echo "" echo "### 5. Run CMS Migrations" echo '```bash' echo "pnpm db:migrate"