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.
17 lines
540 B
TypeScript
17 lines
540 B
TypeScript
import "dotenv/config";
|
|
import { defineConfig, env } from "prisma/config";
|
|
|
|
// Prisma 7 config. The datasource URL lives here (not in schema.prisma).
|
|
// We NEVER run `prisma migrate`/`db push` against this database — it is shared
|
|
// live with the Arcturus emulator. CMS-only schema changes go in
|
|
// prisma/migrations/*.sql (idempotent) applied via `pnpm db:migrate`.
|
|
export default defineConfig({
|
|
schema: "prisma/schema.prisma",
|
|
migrations: {
|
|
path: "prisma/migrations",
|
|
},
|
|
datasource: {
|
|
url: env("DATABASE_URL"),
|
|
},
|
|
});
|