From 3e2c4cfdbcc730fd5e585d5e4ef666ad845b5df9 Mon Sep 17 00:00:00 2001 From: David Valdez Date: Fri, 2 Aug 2019 12:18:51 -0500 Subject: [PATCH] All the terms are now part of the "topics" vocabulary. And the old vocabularies were converted into term paremts. --- .../upgrade_d7_taxonomy_term_vocabulary_1.yml | 25 +++------ ...upgrade_d7_taxonomy_term_vocabulary_10.yml | 13 +++-- ...upgrade_d7_taxonomy_term_vocabulary_12.yml | 13 +++-- ...upgrade_d7_taxonomy_term_vocabulary_13.yml | 13 +++-- .../upgrade_d7_taxonomy_term_vocabulary_2.yml | 13 +++-- .../upgrade_d7_taxonomy_term_vocabulary_3.yml | 8 +-- .../upgrade_d7_taxonomy_term_vocabulary_7.yml | 13 +++-- .../upgrade_d7_taxonomy_vocabulary.yml | 52 +++++++------------ 8 files changed, 57 insertions(+), 93 deletions(-) diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_1.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_1.yml index 0a1f74a..88b2a2d 100644 --- a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_1.yml +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_1.yml @@ -18,11 +18,7 @@ process: - plugin: get source: tid - vid: - - - plugin: migration_lookup - migration: upgrade_d7_taxonomy_vocabulary - source: vid + vid: 'topics' name: - plugin: get @@ -39,22 +35,13 @@ process: - plugin: get source: weight - parent: '0' - forum_container: - - - plugin: get - source: is_container - changed: - - - plugin: get - source: timestamp - langcode: - - - plugin: get - source: language + parent: + - plugin: migration_lookup + migration: upgrade_d7_taxonomy_vocabulary + source: vid destination: plugin: 'entity:taxonomy_term' - default_bundle: vocabulary_1 + default_bundle: 'topics' migration_dependencies: required: - upgrade_d7_taxonomy_vocabulary diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_10.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_10.yml index 7ed7361..fa31030 100644 --- a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_10.yml +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_10.yml @@ -18,11 +18,7 @@ process: - plugin: get source: tid - vid: - - - plugin: migration_lookup - migration: upgrade_d7_taxonomy_vocabulary - source: vid + vid: 'topics' name: - plugin: get @@ -39,7 +35,10 @@ process: - plugin: get source: weight - parent: '0' + parent: + - plugin: migration_lookup + migration: upgrade_d7_taxonomy_vocabulary + source: vid forum_container: - plugin: get @@ -54,7 +53,7 @@ process: source: language destination: plugin: 'entity:taxonomy_term' - default_bundle: vocabulary_10 + default_bundle: 'topics' migration_dependencies: required: - upgrade_d7_taxonomy_vocabulary diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_12.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_12.yml index 701a0f1..5eef738 100644 --- a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_12.yml +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_12.yml @@ -18,11 +18,7 @@ process: - plugin: get source: tid - vid: - - - plugin: migration_lookup - migration: upgrade_d7_taxonomy_vocabulary - source: vid + vid: 'topics' name: - plugin: get @@ -39,7 +35,10 @@ process: - plugin: get source: weight - parent: '0' + parent: + - plugin: migration_lookup + migration: upgrade_d7_taxonomy_vocabulary + source: vid forum_container: - plugin: get @@ -54,7 +53,7 @@ process: source: language destination: plugin: 'entity:taxonomy_term' - default_bundle: vocabulary_12 + default_bundle: 'topics' migration_dependencies: required: - upgrade_d7_taxonomy_vocabulary diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_13.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_13.yml index 330b9f6..77a7c9a 100644 --- a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_13.yml +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_13.yml @@ -18,11 +18,7 @@ process: - plugin: get source: tid - vid: - - - plugin: migration_lookup - migration: upgrade_d7_taxonomy_vocabulary - source: vid + vid: 'topics' name: - plugin: get @@ -39,7 +35,10 @@ process: - plugin: get source: weight - parent: '0' + parent: + - plugin: migration_lookup + migration: upgrade_d7_taxonomy_vocabulary + source: vid forum_container: - plugin: get @@ -54,7 +53,7 @@ process: source: language destination: plugin: 'entity:taxonomy_term' - default_bundle: vocabulary_13 + default_bundle: 'topics' migration_dependencies: required: - upgrade_d7_taxonomy_vocabulary diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_2.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_2.yml index 1519926..f6421a2 100644 --- a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_2.yml +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_2.yml @@ -18,11 +18,7 @@ process: - plugin: get source: tid - vid: - - - plugin: migration_lookup - migration: upgrade_d7_taxonomy_vocabulary - source: vid + vid: 'topics' name: - plugin: get @@ -39,7 +35,10 @@ process: - plugin: get source: weight - parent: '0' + parent: + - plugin: migration_lookup + migration: upgrade_d7_taxonomy_vocabulary + source: vid forum_container: - plugin: get @@ -54,7 +53,7 @@ process: source: language destination: plugin: 'entity:taxonomy_term' - default_bundle: vocabulary_2 + default_bundle: 'topics' migration_dependencies: required: - upgrade_d7_taxonomy_vocabulary diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_3.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_3.yml index 9b95879..db9f326 100644 --- a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_3.yml +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_3.yml @@ -26,11 +26,7 @@ process: # - 50 # Is not going to be used anymore. - plugin: get - vid: - - - plugin: migration_lookup - migration: upgrade_d7_taxonomy_vocabulary - source: vid + vid: 'article_type' name: - plugin: get @@ -62,7 +58,7 @@ process: source: language destination: plugin: 'entity:taxonomy_term' - default_bundle: article_type + default_bundle: 'article_type' migration_dependencies: required: - upgrade_d7_taxonomy_vocabulary diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_7.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_7.yml index 7b8ec03..8e53aa7 100644 --- a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_7.yml +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_term_vocabulary_7.yml @@ -18,11 +18,7 @@ process: - plugin: get source: tid - vid: - - - plugin: migration_lookup - migration: upgrade_d7_taxonomy_vocabulary - source: vid + vid: 'topics' name: - plugin: get @@ -39,7 +35,10 @@ process: - plugin: get source: weight - parent: '0' + parent: + - plugin: migration_lookup + migration: upgrade_d7_taxonomy_vocabulary + source: vid forum_container: - plugin: get @@ -54,7 +53,7 @@ process: source: language destination: plugin: 'entity:taxonomy_term' - default_bundle: vocabulary_7 + default_bundle: 'topics' migration_dependencies: required: - upgrade_d7_taxonomy_vocabulary diff --git a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_vocabulary.yml b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_vocabulary.yml index db45346..4a450f9 100644 --- a/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_vocabulary.yml +++ b/web/modules/custom/geo_upgrade/migrations/upgrade_d7_taxonomy_vocabulary.yml @@ -13,48 +13,34 @@ label: 'Taxonomy vocabularies' source: plugin: d7_taxonomy_vocabulary process: - vid: - - - plugin: make_unique_entity_field - source: machine_name - entity_type: taxonomy_vocabulary - field: vid - length: 32 - migrated: true - - - plugin: forum_vocabulary - machine_name: forums - - - plugin: skip_on_value + vid: 'topics' + name: + - plugin: skip_on_value method: row not_equals: true - # Only migrate these vocabularies. + source: name + # Only convert these vocabularies on terms. value: - - vocabulary_1 - - vocabulary_2 - # - vocabulary_3 This was created manually and renamed as "article type" - - vocabulary_7 - - vocabulary_10 - - vocabulary_12 - - vocabulary_13 - label: - - - plugin: get - source: name - name: - - - plugin: get - source: name - description: - - - plugin: get + - 'Economic Sectors' + - 'Regions' + - 'Institutions & Structures' + - 'Visions & Models' + - 'Movements & Struggles' + - 'Practices, Tools & Strategies' + description/value: + - plugin: get source: description + description/format: + - plugin: default_value + default_value: 'full_html' weight: - plugin: get source: weight + parent: '0' destination: - plugin: 'entity:taxonomy_vocabulary' + plugin: 'entity:taxonomy_term' + default_bundle: topics migration_dependencies: required: { } optional: { }