ALTER TABLE store_settings
    ADD COLUMN elastic_products_username VARCHAR(190) NULL AFTER elastic_products_index,
    ADD COLUMN elastic_products_password VARCHAR(190) NULL AFTER elastic_products_username,
    ADD COLUMN elastic_orders_username VARCHAR(190) NULL AFTER elastic_orders_index,
    ADD COLUMN elastic_orders_password VARCHAR(190) NULL AFTER elastic_orders_username;

-- Opțional: dacă vrei să pornești din credențialele vechi ca fallback vizibil și în noile câmpuri.
UPDATE store_settings
SET
    elastic_products_username = COALESCE(NULLIF(elastic_products_username, ''), elastic_username),
    elastic_products_password = COALESCE(NULLIF(elastic_products_password, ''), elastic_password),
    elastic_orders_username = COALESCE(NULLIF(elastic_orders_username, ''), elastic_username),
    elastic_orders_password = COALESCE(NULLIF(elastic_orders_password, ''), elastic_password);
