Add the bio and the gpg field in the users.

Also, the user migration was updated to migrate the data of these
fields.
This commit is contained in:
David Valdez 2018-08-28 18:20:36 -05:00
parent f9db6433cd
commit 14e829fd66
9 changed files with 198 additions and 33 deletions
web/modules/custom/agaric_migration/migrations

View file

@ -7,18 +7,18 @@ source:
process:
filename: filename
source_full_path:
-
plugin: concat
delimiter: /
source:
- filepath
-
plugin: str_replace
search: 'sites/default/files/'
# The old files must be located at this path:
replace: 'sites/default/import/'
-
plugin: urlencode
-
plugin: concat
delimiter: /
source:
- filepath
-
plugin: str_replace
search: 'sites/default/files/'
# The old files must be located at this path:
replace: 'sites/default/import/'
-
plugin: urlencode
uri:
plugin: file_copy
source:
@ -29,17 +29,17 @@ process:
created: timestamp
changed: timestamp
uid:
-
plugin: migration_lookup
migration: agaric_user
source: uid
no_stub: true
-
# If the user id does not exists then migrate it as anonymous.
plugin: default_value
default_value: 0
-
plugin: migration_lookup
migration: agaric_user
source: uid
no_stub: true
-
# If the user id does not exists then migrate it as anonymous.
plugin: default_value
default_value: 0
destination:
plugin: entity:file
migration_dependencies:
required:
- nichq_community_user
- agaric_user

View file

@ -16,14 +16,14 @@ process:
default_value: "und"
title: title
uid:
-
plugin: migration_lookup
migration: agaric_user
source: node_uid
no_stub: true
-
plugin: skip_on_empty
method: row
-
plugin: migration_lookup
migration: agaric_user
source: node_uid
no_stub: true
-
plugin: skip_on_empty
method: row
paragraph_body:
plugin: migration
migration: agaric_page_paragraph
@ -31,7 +31,7 @@ process:
field_body_paragraph:
plugin: iterator
source:
- '@paragraph_body'
- '@paragraph_body'
process:
target_id: '0'
target_revision_id: '1'
@ -45,5 +45,5 @@ process:
revision_timestamp: timestamp
migration_dependencies:
required:
- agaric_user
- agaric_page_paragraph
- agaric_user
- agaric_page_paragraph

View file

@ -15,6 +15,7 @@ process:
status: status
timezone: timezone
init: init
field_bio: field_bio
roles:
-
plugin: static_map
@ -30,3 +31,29 @@ process:
plugin: role_generate
entity_type: user_role
value_key: id
field_gpg_public_key/target_id:
-
plugin: extract
source: field_gpg_public_key
default: ''
index:
- 0
- fid
-
plugin: skip_on_empty
method: process
-
plugin: migration_lookup
migration: agaric_file
user_picture:
-
plugin: default_value
source: picture
default_value: null
-
plugin: migration_lookup
migration: agaric_file
migration_dependencies:
optional:
- agaric_file