From ee198096938c4d6b7e89820495b296c7b67358d5 Mon Sep 17 00:00:00 2001 From: Mauricio Dinarte Date: Sun, 4 Oct 2020 13:41:15 -0600 Subject: [PATCH] Fix docblocks --- 11.txt | 6 +++--- 20.txt | 4 ++-- 27.txt | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/11.txt b/11.txt index b180c1d..25e9baa 100644 --- a/11.txt +++ b/11.txt @@ -14,15 +14,15 @@ The explanation below is only for the user migration. It depends on a file migra Have a look at the previous post for details on the *source* values. For reference, the user creation time is provided by the `member_since` column, and one of the values is `April 4, 2014`. The following snippet shows how the various user date related properties are set: -``` -created: +```yaml +created: plugin: format_date source: member_since from_format: 'F j, Y' to_format: 'U' changed: '@created' access: '@created' -login: '@created' +login: '@created' ``` The `created`, *entity property* stores a [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time) of when the user was added to Drupal. The value itself is an integer number representing the number of seconds since the [epoch](https://en.wikipedia.org/wiki/Epoch_\(computing\)). For example, `280299600` represents `Sun, 19 Nov 1978 05:00:00 GMT`. Kudos to the readers who knew this is [Drupal's default `expire` HTTP header](https://git.drupalcode.org/project/drupal/blob/8.8.x/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php#L291). Bonus points if you knew it was chosen in honor of [someone's birthdate](https://dri.es/about). ;-) diff --git a/20.txt b/20.txt index 36f8638..b7fb2ec 100644 --- a/20.txt +++ b/20.txt @@ -64,8 +64,8 @@ Then specify which `columns` to make available to the migration. In this case, w The rest of the migration is almost identical to the [CSV example](https://understanddrupal.com/articles/migrating-csv-files-drupal). Small changes were made to prevent machine name conflicts with other examples in the demo repository. For reference, the following snippet shows the *process* and *destination* sections for the LibreOffice Calc *paragraph* migration. -``` -process: +```yaml +process: field_ud_book_paragraph_title: book_title field_ud_book_paragraph_author: 'Book author' destination: diff --git a/27.txt b/27.txt index f470ce6..d9db525 100644 --- a/27.txt +++ b/27.txt @@ -34,8 +34,8 @@ psf_number_components: source: src_decimal_number ``` -``` -$ drush mim ud_migrations_debug +```console +$ drush mim ud_migrations_debug [notice] Processed 3 items (0 created, 0 updated, 3 failed, 0 ignored) - done with 'ud_migrations_debug' In MigrateToolsCommands.php line 811: