X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ffile%2Fmigrations%2Fd7_file.yml;fp=web%2Fcore%2Fmodules%2Ffile%2Fmigrations%2Fd7_file.yml;h=3ead3e5ed436483849a164916757c9559e43bb2f;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/file/migrations/d7_file.yml b/web/core/modules/file/migrations/d7_file.yml new file mode 100644 index 000000000..3ead3e5ed --- /dev/null +++ b/web/core/modules/file/migrations/d7_file.yml @@ -0,0 +1,47 @@ +# Every migration that references a file by Drupal 7 fid should specify this +# migration as an optional dependency. +id: d7_file +label: Public files +audit: true +migration_tags: + - Drupal 7 + - Content +source: + plugin: d7_file + scheme: public + constants: + # The tool configuring this migration must set source_base_path. It + # represents the fully qualified path relative to which URIs in the files + # table are specified, and must end with a /. See source_full_path + # configuration in this migration's process pipeline as an example. + source_base_path: '' +process: + # If you are using this file to build a custom migration consider removing + # the fid field to allow incremental migrations. + fid: fid + filename: filename + source_full_path: + - + plugin: concat + delimiter: / + source: + - constants/source_base_path + - filepath + - + plugin: urlencode + uri: + plugin: file_copy + source: + - '@source_full_path' + - uri + filemime: filemime + # No need to migrate filesize, it is computed when file entities are saved. + # filesize: filesize + status: status + # Drupal 7 didn't keep track of the file's creation or update time -- all it + # had was the vague "timestamp" column. So we'll use it for both. + created: timestamp + changed: timestamp + uid: uid +destination: + plugin: entity:file