Skip to content

Instantly share code, notes, and snippets.

Created August 10, 2016 04:21
Show Gist options
  • Save anonymous/73445728b98ae7c2469d327041402e7f to your computer and use it in GitHub Desktop.
Save anonymous/73445728b98ae7c2469d327041402e7f to your computer and use it in GitHub Desktop.
Project machine names that depend on project machine name
SELECT DISTINCT fdfpmn.field_project_machine_name_value, pdd.dependency
FROM project_dependency_dependency pdd
LEFT JOIN project_dependency_component pdc ON pdc.component_id = pdd.component_id
LEFT JOIN field_data_field_release_project fdfrp ON fdfrp.entity_id = pdc.release_nid
LEFT JOIN field_data_field_project_machine_name fdfpmn on fdfpmn.entity_id = fdfrp.field_release_project_target_id
WHERE pdd.dependency IN (SELECT DISTINCT pdc.name FROM project_dependency_dependency pdd
LEFT JOIN project_dependency_component pdc ON pdc.component_id = pdd.component_id
LEFT JOIN field_data_field_release_project fdfrp ON fdfrp.entity_id = pdc.release_nid
LEFT JOIN field_data_field_project_machine_name fdfpmn on fdfpmn.entity_id = fdfrp.field_release_project_target_id
WHERE fdfpmn.field_project_machine_name_value = 'context')
AND pdd.core_api REGEXP '7.x|8.x';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment