Repository navigation
Migrate HackKit to MikroORM with unified Core auth and app migrations - #3
joshuasilva414 wants to merge 15 commits into
Conversation
|
Important Review skippedToo many files! This PR contains 317 files, which is 217 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (317)
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Integrate PR #2 tsup builds and watch scripts while preserving MikroORM dependencies, removed legacy packages, public Core and plugin entry points, external Vitest hooks, and Next build cache outputs.
|
This one's a whopper |
There was a problem hiding this comment.
It's from the Matt Pocock agent skills. We gitignore that directory if you'd prefer
There was a problem hiding this comment.
I don't actually use that particular skill
Summary
Migrates HackKit to MikroORM as its sole application ORM, with Better Auth owned by Core. Targets
devand fresh databases. Existing deployed data and user accounts are not converted.Changes in the current PR
core_userentity. Sessions, accounts, and domain/plugin foreign keys referencecore_user.id. Better Auth mapsimagetoprofilePhotoUrl. Keep one displayname; remove duplicate names/photos, name splitting, and profile synchronization subscribers. Role, approval, and check-in changes remain authorized domain operations.enabled: falseretain entities, settings, permissions, and data while skipping runtime setup. Disabled built-in routes return 404, actions return failures, and navigation links are hidden. Discord/email provider options resolve lazily.apps/web: generate (including blank migrations), status, snapshot/live-schema checks, staged migrate/rollback with--to, seed, and development/test-only local SQLite reset. Optional JSON result files separate structured output from driver diagnostics. Migration utilities live in the app; the CLI's existing plugin-sync implementation is retained.Latest review changes
PR head:
d6eb306oncodex/mikroorm-core-auth, targetingdev. Includes the following reviewed updates:df090dd: Replace the global profile lock with one lock per target user. Unrelated profiles can update independently on PostgreSQL/MySQL. HackTag uniqueness is enforced by the database; SQLite/libSQL retain their single-writer limitation.84eea1c: Use extensionless relative source imports in tsup-built packages withESNext/BundlerTypeScript settings. Generated JavaScript retains the extensions Node requires. The UI package keeps its existing tsc build.ffa374c: Move HackKit bootstrap, auth/logging integration, and execution scopes tocore/src/runtime.ts. Keep driver types and ORM configuration incore/src/mikro/options.ts. Public package imports are unchanged.6515887: Use the inferred native user DTO and MikroORM serialization, removing theidtoauthIdmapping. Update in-repo consumers, public profiles, and admin exports to useuser.id. Rename the hacker record and registration input touserId; retain its mapping to the existingauth_iddatabase column. No database migration is required for these contract changes.4701ef6/d6eb306: Format the transaction test and move Core/Discord/Teams tsup entrypoint configuration into dedicated config files, preserving emitted formats and declaration generation.Breaking API changes: user responses and the admin CSV identifier column change from
authIdtoid. Hacker responses andregisterHackerinputs change fromauthIdtouserId. Other authorization/relationship inputs retain their existing names. The singlenamefield remains unchanged.Local validation
Validation used disposable databases. No deployed database was accessed. These are local results; GitHub checks apply to the published PR head separately.
sqld0.24.32) across separate disposable service runs. Missing targets in individual runs were reported as skipped.skipLibChecksetting; full dependency declaration checking encounters existing UI and third-party declaration errors.userIdkey and passed on focused rerun. SQLite/local libSQL matrix checks passed and confirmed the committed schema still matches. PostgreSQL, MySQL, and network libSQL were skipped for this latest identifier run.git diff --checkpassed. Local execution used Node 24.2.0; the project/CI minimum remains Node 22.17.0.Review and release notes
drizzle-ormis absent from the resolved dependency graph.See the migration guide, the package schema upgrade contract, ADR 0013, and
apps/web/README.md.