agaric-coop/web/modules/custom/agaric_migration/migrations/agaric_files.yml

46 lines
874 B
YAML
Raw Normal View History

2018-08-28 22:15:47 +00:00
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