Rebuild atomcms-next foundation on Prisma (align to habbo-next reference)
Replace the superseded Drizzle monorepo scaffold with a single-app Prisma 7 data layer, mirroring the proven habbo-next approach to the shared Arcturus emulator DB (introspect/conform only, idempotent SQL migrations via a custom runner; never migrate-diff). - prisma/schema.prisma: User, UsersCurrency (composite PK), Ban, WebsiteSetting mapped to AtomCMS's default.sql columns; client generated to src/generated/prisma - src/lib/prisma.ts: PrismaMariaDb adapter singleton; src/env.ts zod env - src/lib/services: siteSettings (cached setting() equivalent) + CurrencyType enum - prisma/migrations + scripts/apply-migrations.ts: idempotent CMS-table runner Verified: prisma generate OK, tsc --noEmit exit 0, vitest 6/6 pass.
This commit is contained in:
1 parent
7bd4f2b28e
commit
b5bc7f6daf
44 files changed
+1279
-511
No files matched your search
+16
-8
@@ -5,18 +5,26 @@
|
||||
"engines": { "node": ">=22" },
|
||||
"packageManager": "[email protected]",
|
||||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
"test": "turbo run test",
|
||||
"typecheck": "turbo run typecheck"
|
||||
"prisma:generate": "prisma generate",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run",
|
||||
"db:migrate": "tsx scripts/apply-migrations.ts",
|
||||
"db:migrate:status": "tsx scripts/apply-migrations.ts --status"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/adapter-mariadb": "^7.8.0",
|
||||
"@prisma/client": "^7.8.0",
|
||||
"zod": "^3.24.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"turbo": "^2.3.0",
|
||||
"typescript": "^5.7.0",
|
||||
"@types/node": "^22.10.0",
|
||||
"dotenv": "^16.4.0",
|
||||
"prisma": "^7.8.0",
|
||||
"tsx": "^4.19.0",
|
||||
"vitest": "^2.1.0",
|
||||
"@types/node": "^22.10.0"
|
||||
"typescript": "^5.7.0",
|
||||
"vitest": "^2.1.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": ["esbuild"]
|
||||
"onlyBuiltDependencies": ["esbuild", "prisma", "@prisma/client", "@prisma/engines"]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user