diff --git a/README.md b/README.md index 8d283e66..0767762c 100644 --- a/README.md +++ b/README.md @@ -55,13 +55,21 @@ yarn install ### 2. Database Setup -The CMS shares a database with the Polaris/Arcturus emulator. Use an existing database or create a new one: +The CMS supports both **MySQL / MariaDB** and **PostgreSQL**. The database type is automatically detected from your `DATABASE_URL` protocol (`mysql://` or `postgres://`). +#### Option A: MySQL / MariaDB +Create your database: ```sql CREATE DATABASE IF NOT EXISTS epicnext_cms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ``` -The CMS reads emulator-owned tables (`users`, `items`, `rooms`, `bans`, etc.) directly. It never creates, alters, or drops them. The Drizzle schema in `src/db/schema.ts` is generated from the existing database structure and does not modify it. +#### Option B: PostgreSQL +Create your database: +```sql +CREATE DATABASE epicnext_cms; +``` + +The CMS reads emulator-owned tables (`users`, `items`, `rooms`, `bans`, etc.) directly. It never creates, alters, or drops them. The Drizzle schema in `src/db/schema.ts` maps to the existing database structure. > **Note:** The CMS does **not** own the emulator schema — it maps to those tables via Drizzle. Never run `drizzle-kit push` / `migrate` against the shared DB. CMS-owned tables (`website_*`, `radio_*`, etc.) are created via idempotent SQL in `drizzle/migrations/`.