ALTER TABLE client_services
  ADD COLUMN catalog_section_key VARCHAR(150) DEFAULT NULL AFTER catalog_section_id,
  ADD COLUMN derived_form_element_id INT DEFAULT NULL AFTER form_element_id,
  ADD KEY idx_client_services_catalog_section_key (catalog_section_key),
  ADD KEY idx_client_services_derived_element (derived_form_element_id);

ALTER TABLE catalog_items
  ADD COLUMN derived_form_element_id INT DEFAULT NULL AFTER services_template_id,
  ADD KEY idx_catalog_items_derived_element (derived_form_element_id);

ALTER TABLE client_catalog_items
  ADD COLUMN derived_form_element_id INT DEFAULT NULL AFTER client_services_id,
  ADD KEY idx_client_catalog_items_derived_element (derived_form_element_id);
