Files migration
This commit is contained in:
parent
3be2993ab2
commit
f9db6433cd
3 changed files with 46 additions and 1 deletions
|
@ -8,4 +8,4 @@ shared_configuration:
|
|||
dependencies:
|
||||
enforced:
|
||||
module:
|
||||
- agaric_migration
|
||||
- agaric_migration
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
id: agaric_file
|
||||
migration_group: agaric
|
||||
label: Public files
|
||||
source:
|
||||
plugin: d7_file
|
||||
scheme: public
|
||||
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
|
||||
uri:
|
||||
plugin: file_copy
|
||||
source:
|
||||
- '@source_full_path'
|
||||
- uri
|
||||
filemime: filemime
|
||||
status: status
|
||||
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
|
||||
destination:
|
||||
plugin: entity:file
|
||||
migration_dependencies:
|
||||
required:
|
||||
- nichq_community_user
|
Loading…
Reference in a new issue