Simo
5fd40feaa6
Add CMS tables to Prisma schema (data layer complete: 190 models)
...
Models the Laravel-migration CMS tables (website_*, radio_*, game_*,
social_accounts, staff_activities, tags/taggables, alert_logs,
email_templates, referrals, ...) via Blueprint->Prisma mapping. Excludes
emulator-owned collisions (permissions/website_settings already modeled) and
Laravel-only infra the Next.js app replaces (cache/sessions/failed_jobs/
password_resets).
Data layer now covers the whole AtomCMS schema: 190 models (4 hand-authored +
119 emulator + ~67 CMS). Verified: prisma validate clean, generate OK,
tsc exit 0, vitest 6/6.
2026-06-27 15:48:12 +02:00
Simo
f7e2cc4998
Convert full emulator schema to Prisma (119 tables from default.sql)
...
Models every Arcturus-owned table in default.sql (catalog, items, rooms,
guilds, pets, messenger, navigator, support, users_*, etc.) as flat Prisma
models — enum columns as String, @@id/@@unique/@@ignore per the real keys,
@@map to the exact table names. Assembled from a parallel modeling pass and
normalized (id de-dup, @db.Enum/Double/Decimal fixes).
123 models total (4 hand-authored + 119 generated). Verified: prisma validate
clean, prisma generate OK, tsc exit 0, vitest 6/6.
2026-06-27 15:43:06 +02:00
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