-- Per-site PHP opcache overrides for cac-litespeed (and future cac/cac-fpm).
-- Mirrors fpm_max_children_override pattern: NULL means "use image default"
-- (currently 64 MB / 8000 files from configs/litespeed/lsphp-overrides.ini).
--
-- Plumbed through whp_build_php_pool_env in web-files/libs/site-pool-env.php
-- as OPCACHE_MEMORY_MB / OPCACHE_MAX_FILES env vars to the container, which
-- the lsphp entrypoint reads to write a per-container php.d ini drop-in.
--
-- Bounds enforced in the panel:
--   memory_mb:  32-512   (anything smaller hurts WP+plugins, larger is waste)
--   max_files:  2000-32000

USE whp;

ALTER TABLE whp.sites
  ADD COLUMN IF NOT EXISTS opcache_memory_mb_override INT(11) DEFAULT NULL
    COMMENT 'Per-site opcache.memory_consumption MB override; NULL = use image default',
  ADD COLUMN IF NOT EXISTS opcache_max_files_override INT(11) DEFAULT NULL
    COMMENT 'Per-site opcache.max_accelerated_files override; NULL = use image default';
