Database Schema
Core tables, columns, safe vs unsupported
What it is
WHMDC uses MySQL/MariaDB. Core tables are created by the installer and migrations. This reference lists key tables and columns for developers building integrations or modules.
Core tables (safe to read)
These tables are part of the stable schema. Reading via API or helpers is supported. Writing should go through the API or documented helpers where possible.
| Table | Key columns |
|---|---|
users | id, email, first_name, last_name, user_type, status, email_verified |
clients | id, uuid, user_id, account_number, company_name, status, client_group_id |
products | id, name, slug, category_id, server_id, module |
product_pricing | product_id, cycle, price, setup_fee |
services | id, uuid, client_id, product_id, order_id, status, domain, username, server_id |
orders | id, client_id, status, total |
order_items | order_id, product_id, domain, billing_cycle |
invoices | id, uuid, client_id, invoice_number, total, status, due_date |
invoice_items | invoice_id, description, quantity, price |
transactions | id, uuid, invoice_id, amount, payment_method, status |
domains | id, client_id, domain, registrar, status |
tickets | id, client_id, department_id, subject, status |
hosting_servers | id, name, module_name, hostname |
api_keys | id, uuid, name, key_prefix, permissions, status |
webhooks | id, uuid, url, events, secret, status |
webhook_deliveries | webhook_id, event_type, response_status, attempts |
Relationships
clients.user_id → users.id. services.client_id → clients.id. invoices.client_id → clients.id. order_items.order_id → orders.id. invoice_items.invoice_id → invoices.id.
Tables to avoid modifying directly
Do not INSERT/UPDATE/DELETE directly into users, clients, invoices, transactions, orders, services unless you know the schema and constraints. Use the API or helpers. Tables like settings, system_logs, activity_log are internal.
Migration strategy
Schema changes are applied via install/sql-files/ migrations. Run migrations via the installer or Admin. Do not alter core tables manually; use migrations for new columns or tables.
Was this helpful?