Conversation
…le ORM Replace the single-package npm project with a pnpm workspaces monorepo, migrate from Aurora Serverless v2 + Prisma to Aurora DSQL + Drizzle ORM, and replace ESLint + Prettier with oxlint + oxfmt. Architecture: - apps/webapp (Next.js), apps/async-job (Lambda), apps/cdk (CDK infra) - packages/db (Drizzle schema, DSQL client, migration runner) - packages/shared-types (job payload Zod schemas) Database: - Aurora DSQL with IAM auth (no VPC, no NAT, no Bastion) - Drizzle ORM with relations() for joins (no FK, DSQL constraint) - Custom migration runner: hash verification, 1 DDL/tx, DSQL SQL validation - dsql-migrator CDK Construct: Docker Lambda + CDK Trigger for deploy-time migration Tooling: - oxlint with type-aware linting (oxlint-tsgolint) replaces ESLint + tsc --noEmit - oxfmt with .oxfmtrc.json matching original .prettierrc (singleQuote, printWidth 120) - shamefully-hoist removed; missing implicit deps made explicit Docker: - All Dockerfiles use pnpm install (no --filter) for strict mode compatibility - esbuild bundles to .mjs (Lambda ESM requirement) - IgnoreMode.DOCKER on all Docker assets to read root .dockerignore - Verified: all 3 images build and respond to Lambda RIE invocations Refs: #98, #91, discussion #94
…gration - Fix client.ts: use Proxy for lazy db singleton to prevent crash when getPool is imported without DSQL_ENDPOINT set (e.g. migration CLI) - Fix migrate script: add --env-file=.env to load DSQL credentials - Document VPC ENI cleanup workaround in migration guide for v2→v3 update scenario where Lambda ENIs block security group deletion
Replace the flat checklist with 8 incremental stages (12a-12h): static checks → build → local Docker build → local migration → local dev server e2e → cdk deploy → deployed e2e → Lambda migration. Each stage catches a different class of bugs that later stages cannot surface efficiently. Documents known issues (VPC ENI cleanup) at the stage where they manifest.
…heck - Add drizzle-kit as devDependency with drizzle.config.ts - Add check-dsql-compat.ts validator (runs after generate) - Add 'generate' pnpm script: drizzle-kit generate && check - Initialize drizzle-kit snapshot from existing 0001_initial.sql - Document schema change workflow in AGENTS.md
check-dsql-compat.ts now auto-fixes: - statement-breakpoint → blank lines (runner splits on \n\n) - CREATE INDEX → CREATE INDEX ASYNC - Removes REFERENCES / FOREIGN KEY lines Still errors on unfixable patterns: ALTER COLUMN TYPE, DROP COLUMN, SERIAL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP: pnpm workspaces monorepo + Aurora DSQL + Drizzle ORM migration.
Closes #98, closes #91.
See
.kiro/specs/pnpm-workspaces/plan.mdfor full design.