Commit Graph
10 Commits
Author SHA1 Message Date
Simo b5bc7f6daf 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.
2026-06-27 15:26:40 +02:00
Simo 7bd4f2b28e test(db): add env-gated integration smoke test for real-schema reads 2026-06-27 14:37:13 +02:00
Simo 2a304c94a4 docs(db): add introspect-only drizzle config and DB README 2026-06-27 14:35:25 +02:00
Simo d04ed42586 feat(db): add users/currency/bans/settings read repositories 2026-06-27 14:34:59 +02:00
Simo 3e3776b477 feat(db): add pure isBanActive predicate matching Laravel ban filtering 2026-06-27 14:33:51 +02:00
Simo 5369f99b07 feat(db): hand-author drizzle schema for users, users_currency, bans, website_settings 2026-06-27 14:33:25 +02:00
Simo 0966aa7dda feat(db): add @atomcms/db package skeleton + mysql2/drizzle client 2026-06-27 14:32:45 +02:00
Simo c2366fe6c9 feat(settings): add cached SettingsService (setting() equivalent) 2026-06-27 14:31:35 +02:00
Simo edbd5c89ba feat(settings): add emulator-fixed CurrencyType enum 2026-06-27 14:30:47 +02:00
Simo 8e0ad40c19 chore(next): scaffold atomcms-next monorepo (pnpm + turborepo) 2026-06-27 14:29:24 +02:00