added roles and created user migration, added uid to breve & materiau migration

This commit is contained in:
2019-02-06 12:59:51 +01:00
parent 489cea7f73
commit 168da1148d
58 changed files with 2056 additions and 58 deletions

View File

@@ -28,6 +28,11 @@ process:
created: created
changed: changed
uid:
plugin: migration_lookup
migration: d7_users
source: uid
field_migration:
plugin: default_value
default_value: 'migration_imported'
@@ -95,6 +100,7 @@ process:
migration_dependencies:
required:
- d7_allpublicfiles
- d7_users
- d7_taxonomy_term_thesaurus
- d7_taxonomy_term_tags
- d7_taxonomy_term_company

View File

@@ -28,6 +28,11 @@ process:
created: created
changed: changed
uid:
plugin: migration_lookup
migration: d7_users
source: uid
field_short_description: field_nature_titre
field_migration:
plugin: default_value
@@ -145,6 +150,7 @@ process:
migration_dependencies:
required:
- d7_allpublicfiles
- d7_users
- d7_taxonomy_term_thesaurus
- d7_taxonomy_term_tags
- d7_taxonomy_term_company

View File

@@ -0,0 +1,109 @@
id: d7_users
label: User accounts
migration_group: d7_materio
audit: true
migration_tags:
- Drupal 7
- Content
class: Drupal\user\Plugin\migrate\User
source:
plugin: d7_user
destination:
plugin: entity:user
process:
# If you are using this file to build a custom migration consider removing
# the uid field to allow incremental migrations.
# uid: uid
name: name
pass: pass
mail:
-
plugin: skip_on_value
equals: true
source: mail
method: row
value:
- "dev@g-u-i.net"
- "admin@g-u-i.net"
-
plugin: default_value
source: mail
default_value: null
created: created
access: access
login: login
status: status
timezone: timezone
langcode:
plugin: user_langcode
source: entity_language
fallback_to_site_default: false
preferred_langcode:
plugin: user_langcode
source: language
fallback_to_site_default: true
preferred_admin_langcode:
plugin: user_langcode
source: language
fallback_to_site_default: true
init: init
# roles:
# plugin: migration_lookup
# migration: d7_user_role
# source: roles
roles:
plugin: static_map
source: roles
default_value: 2
map:
1: "anonymous"
2: "authenticated"
3: "admin"
4: "root"
5: "contact_company"
6: "adherent"
7: "free_user"
8: "premium"
9: "unverified"
10: "student"
11: "alpha_testeur"
12: "translator"
13: "admin_showroom"
user_picture:
-
plugin: default_value
source: picture
default_value: null
-
plugin: migration_lookup
migration: d7_file
field_company:
plugin: migration_lookup
migration: d7_taxonomy_term_company
source: field_company
field_showroom:
plugin: migration_lookup
migration: d7_taxonomy_term_showroom
source: field_showroom
field_memo: field_memo
migration_dependencies:
required:
- d7_allpublicfiles
# optional:
# - d7_field_instance
# - d7_file
# - language
# - default_language
# - user_picture_field_instance
# - user_picture_entity_display
# - user_picture_entity_form_display

View File

@@ -65,6 +65,7 @@ class D7NodeBreve extends FieldableEntity {
->fields('n', [
'nid',
'type',
'uid',
'language',
'status',
'created',

View File

@@ -65,6 +65,7 @@ class D7NodeMateriau extends FieldableEntity {
->fields('n', [
'nid',
'type',
'uid',
'language',
'status',
'created',