Home / Developer Reference / Database Schema

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.

TableKey columns
usersid, email, first_name, last_name, user_type, status, email_verified
clientsid, uuid, user_id, account_number, company_name, status, client_group_id
productsid, name, slug, category_id, server_id, module
product_pricingproduct_id, cycle, price, setup_fee
servicesid, uuid, client_id, product_id, order_id, status, domain, username, server_id
ordersid, client_id, status, total
order_itemsorder_id, product_id, domain, billing_cycle
invoicesid, uuid, client_id, invoice_number, total, status, due_date
invoice_itemsinvoice_id, description, quantity, price
transactionsid, uuid, invoice_id, amount, payment_method, status
domainsid, client_id, domain, registrar, status
ticketsid, client_id, department_id, subject, status
hosting_serversid, name, module_name, hostname
api_keysid, uuid, name, key_prefix, permissions, status
webhooksid, uuid, url, events, secret, status
webhook_deliverieswebhook_id, event_type, response_status, attempts

Relationships

clients.user_idusers.id. services.client_idclients.id. invoices.client_idclients.id. order_items.order_idorders.id. invoice_items.invoice_idinvoices.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?

Tags: Developer