SlideShare une entreprise Scribd logo
1  sur  97
Télécharger pour lire hors ligne
migrating to drupal 8
a brief history
drupal.org/upgrade
update vs. upgrade
what types drupal “renewing” we have?
drupal update
drupal update
minor version update
7.24 > 7.25
drupal update
minor version update
7.24 > 7.25

drupal upgrade
drupal update
minor version update
7.24 > 7.25

drupal upgrade
major version upgrade
7.x > 8.x
drupal update
minor version update
7.24 > 7.25

drupal upgrade
major version upgrade
7.x > 8.x
the migrate module
“in service” since 2009

drupal.org/project/migrate
the migrate module
• How it worked?
• Migrations = classes extending Migration.
• Main elements: source, destination, map,
mappings, “hooks” (prepareRow, prepare,
complete, createStub, etc).

• Each migration has to extend the Migration
class or one of its successors.
migrate in D8 core
disclaimer
disclaimer
• the migrate system is under heavy
development right now.
disclaimer
• the migrate system is under heavy
development right now.

• some of the features or APIs may change in
the future
disclaimer
• the migrate system is under heavy
development right now.

• some of the features or APIs may change in
the future

• not all the current work is pushed to 8.x.
disclaimer
• the migrate system is under heavy
development right now.

• some of the features or APIs may change in
the future

• not all the current work is pushed to 8.x.
• The work is in the sandbox at
https://drupal.org/sandbox/chx/2105305
credits
Károly Négyesi (chx)
Mike Ryan (mikeryan)
Moshe Weitzman (moshe weitzman)
Ben Dougherty (benjy)
drupal 8 migration
note
note
• While a significant portion of the code and
the interaction between the elements is
brand new, the actual migrate-y code is
coming straight from D7: highwater marks,
track changes, id map, this is here to
note
• While a significant portion of the code and
the interaction between the elements is
brand new, the actual migrate-y code is
coming straight from D7: highwater marks,
track changes, id map, this is here to

• The new interaction allows for really nice

and powerful migrations but at the same
time we are most definitely not reinventing
wheel.
structure/modules
Migrate
core/modules/migrate/
Migrate
core/modules/migrate/

• provides general API for all migrations
Migrate
core/modules/migrate/

• provides general API for all migrations
• provides interfaces and base classes for all

migration plugin components (source, destination,
process, id_map, row).
Migrate
core/modules/migrate/

• provides general API for all migrations
• provides interfaces and base classes for all

migration plugin components (source, destination,
process, id_map, row).

• provides a plugin manager for manipulation on
migration plugins.
Migrate
core/modules/migrate/

• provides general API for all migrations
• provides interfaces and base classes for all

migration plugin components (source, destination,
process, id_map, row).

• provides a plugin manager for manipulation on
migration plugins.

• provides the migrate configurable (configuration
entity type).
Migrate Drupal
core/modules/migrate_drupal/
Migrate Drupal
core/modules/migrate_drupal/

• the first module using the new Migrate API.
Migrate Drupal
core/modules/migrate_drupal/

• the first module using the new Migrate API.
• kind of migrate_d2d successor.
Migrate Drupal
core/modules/migrate_drupal/

• the first module using the new Migrate API.
• kind of migrate_d2d successor.
• migrates out-of-the-box from Drupal 6 and 7 into
Drupal 8.
Migrate Drupal
core/modules/migrate_drupal/

• the first module using the new Migrate API.
• kind of migrate_d2d successor.
• migrates out-of-the-box from Drupal 6 and 7 into
Drupal 8.

• Defines migrations for all system components:
Migrate Drupal
core/modules/migrate_drupal/

• the first module using the new Migrate API.
• kind of migrate_d2d successor.
• migrates out-of-the-box from Drupal 6 and 7 into
Drupal 8.

• Defines migrations for all system components:
• Drupal 6 settings (site name, slogan, roles, etc)
Migrate Drupal
core/modules/migrate_drupal/

• the first module using the new Migrate API.
• kind of migrate_d2d successor.
• migrates out-of-the-box from Drupal 6 and 7 into
Drupal 8.

• Defines migrations for all system components:
• Drupal 6 settings (site name, slogan, roles, etc)
• Content definitions (vocabularies, node types, etc)
Migrate Drupal
core/modules/migrate_drupal/

• the first module using the new Migrate API.
• kind of migrate_d2d successor.
• migrates out-of-the-box from Drupal 6 and 7 into
Drupal 8.

• Defines migrations for all system components:
• Drupal 6 settings (site name, slogan, roles, etc)
• Content definitions (vocabularies, node types, etc)
• Content (noded, terms, users, etc).
understanding migrations
migrations are configurables
small peek
into configurables
what is a configurable?
what is a configurable?
• “Configurables” are configuration entities.
what is a configurable?
• “Configurables” are configuration entities.
• In Drupal 8 the content is separated from

configuration. Both are classes and are sharing
the same ancestor: the Entity class.
what is a configurable?
• “Configurables” are configuration entities.
• In Drupal 8 the content is separated from

configuration. Both are classes and are sharing
the same ancestor: the Entity class.

DrupalCoreEntityEntity
what is a configurable?
• “Configurables” are configuration entities.
• In Drupal 8 the content is separated from

configuration. Both are classes and are sharing
the same ancestor: the Entity class.
DrupalCoreEntityContentEntityBase

DrupalCoreEntityEntity
what is a configurable?
• “Configurables” are configuration entities.
• In Drupal 8 the content is separated from

configuration. Both are classes and are sharing
the same ancestor: the Entity class.
DrupalCoreEntityContentEntityBase

DrupalCoreEntityEntity
DrupalCoreConfigConfigEntityBase
what is a configurable?
• “Configurables” are configuration entities.
• In Drupal 8 the content is separated from

configuration. Both are classes and are sharing
the same ancestor: the Entity class.
DrupalCoreEntityContentEntityBase

DrupalCoreEntityEntity
DrupalCoreConfigConfigEntityBase
what is a configurable?
•
•
•
•

A configurable is the way Drupal 8 stores the
configuration of a specific functionality. E.g. the the
definition of a node type is stored in a configuration
entity of type “node_type”.
Configuration entity types are annotated classes, meaning
that the object meta information is stored in annotation
rather than in info hooks - as it was in Drupal <= 7.
Imagine configurables as entities storing their data in
config YAML files rather than DB.
The “fields” of a configurable are the public properties
exposed by the configurable object.
what is a configurable?
how it’s stored?
example
migration plugins
parts implemented by specific migrations
source plugins
• plugins returning information and data from
the source of migration.

• usually: the list of fields, the source iterator
(used retrieve data from source).

• each migration should configure a source.
destination plugins
• are handling data at the destination: import,
rollback.

• different plugins for different destination
components: entity, config, etc.

• are defined in the base module (migrate) as

destination is always drupal 8 but if necessary it
can be extended.

• each migration should specify a destination.
id map plugin
• plugins of this type are handling and storing the
•
•
•

relation between primary IDs of source and
destination.
without this, rollback and continuous migrations are
impossible.
in 99% of the cases you’ll use the sql id map plugin
(Sql) that keeps the map of each migration in a table.
table name migrate_map_MIGRATION_ID
processors
• plugins that are performing small but very specialized
operations against values to be migrated.

• Some simple examples: DefaultValue, Concat, etc.
• The most important interface method:
transform().
the anatomy of a migration
migrating user roles from a dupal 6 site
creating the config file
config/migrate.migration.d6_user_role.yml

relative to core/modules/migrate_drupal
config .yml file content
config .yml file content
• id: same as the last part of filename (d6_user_role)
config .yml file content
• id: same as the last part of filename (d6_user_role)
• sourceIds: Source fields, providing a primary ID.
config .yml file content
• id: same as the last part of filename (d6_user_role)
• sourceIds: Source fields, providing a primary ID.
• source: configure the source of data, usually the
source plugin to be used
config .yml file content
• id: same as the last part of filename (d6_user_role)
• sourceIds: Source fields, providing a primary ID.
• source: configure the source of data, usually the
source plugin to be used

• process: describe the list of processors to be applied
per destination field.
config .yml file content
• id: same as the last part of filename (d6_user_role)
• sourceIds: Source fields, providing a primary ID.
• source: configure the source of data, usually the
source plugin to be used

• process: describe the list of processors to be applied
per destination field.

• destination: destination configuration, usually the
destination plugin.
id
id
• this is the configurable unique id.
id
• this is the configurable unique id.
• it must be exactly as the same as the last
part of filename: d6_user_role.
id
• this is the configurable unique id.
• it must be exactly as the same as the last
part of filename: d6_user_role.

id: d6_user_role
sourceIds
sourceIds
• look in D6 schema to find the role primary ID.
sourceIds
• look in D6 schema to find the role primary ID.
• lines 107 - 115 of drupal/modules/user/user.install.
sourceIds
• look in D6 schema to find the role primary ID.
• lines 107 - 115 of drupal/modules/user/user.install.
$schema['role'] = array(
'description' => 'Stores user roles.',
  'fields' => array(
   'rid' => array(
    'type' => 'serial',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'description' => 'Primary Key: Unique role id.',
sourceIds
sourceIds
• use TypedData identifiers for data type.
sourceIds
• use TypedData identifiers for data type.
• Here are the .yml lines that we need to add.
sourceIds
• use TypedData identifiers for data type.
• Here are the .yml lines that we need to add.
sourceIds: 
  rid:
    type: integer
sourceIds
• use TypedData identifiers for data type.
• Here are the .yml lines that we need to add.
sourceIds: 
  rid:
    type: integer

Note: sourceIds will be removed in the near future
and the source plugin will set also the primary id.
source
source
• we need to implement a source plugin first, that
provides the list of fields and the iterator by
querying the D6 backend.
source
• we need to implement a source plugin first, that
provides the list of fields and the iterator by
querying the D6 backend.

• let’s see how it should look (code).
source
• we need to implement a source plugin first, that
provides the list of fields and the iterator by
querying the D6 backend.

• let’s see how it should look (code).
• add the source plugin id in the configuration .yml file.
source
• we need to implement a source plugin first, that
provides the list of fields and the iterator by
querying the D6 backend.

• let’s see how it should look (code).
• add the source plugin id in the configuration .yml file.
source:
  plugin: drupal6_user_role
process
process
• process keys are destination “fields”.
process
• process keys are destination “fields”.
• for configurables: the public properties (except uuid)
process
• process keys are destination “fields”.
• for configurables: the public properties (except uuid)
• for content: the keys from
baseFieldDefinitions
process
• process keys are destination “fields”.
• for configurables: the public properties (except uuid)
• for content: the keys from
baseFieldDefinitions

• let’s see how it looks! (code).
process
• process keys are destination “fields”.
• for configurables: the public properties (except uuid)
• for content: the keys from
baseFieldDefinitions

• let’s see how it looks! (code).
process:
  id:
  label:
  weight:
  permissions:
destination
destination
• should point to the destination plugin.
destination
• should point to the destination plugin.
• in this case we’re importing into user_role entity,
so we’re passing also the entity_type argument.
destination
• should point to the destination plugin.
• in this case we’re importing into user_role entity,
so we’re passing also the entity_type argument.

destination:
plugin: entity
entity_type: user_role
running a migration
• via drush
• There will be a brief UI implemented in
core (to come!)
final notes
final notes

• Minor version updates are unchanged. Developers
continue to use hook_update_N() for those.
final notes

• Minor version updates are unchanged. Developers
continue to use hook_update_N() for those.

• Contrib and custom modules are encouraged to ship

with migrations of their data from D6/D7 to D8. Use
core modules as model.
final notes

• Minor version updates are unchanged. Developers
continue to use hook_update_N() for those.

• Contrib and custom modules are encouraged to ship

with migrations of their data from D6/D7 to D8. Use
core modules as model.

• The underlying Migrate API is source-agnostic.You

can easily migrate into D8 from MS SQL, Oracle, piles
of HTML files, XML feeds, CSV files, etc.
final notes

• Minor version updates are unchanged. Developers
continue to use hook_update_N() for those.

• Contrib and custom modules are encouraged to ship

with migrations of their data from D6/D7 to D8. Use
core modules as model.

• The underlying Migrate API is source-agnostic.You

can easily migrate into D8 from MS SQL, Oracle, piles
of HTML files, XML feeds, CSV files, etc.

• Similarly, Drupal 4.x and Drupal 5.x sites are able to
migrate using this same approach.
Questions?
Thank you.

Contenu connexe

Tendances

Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Acquia
 
Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Phase2
 
Plain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsPlain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsAngela Byron
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)Konstantin Komelin
 
Migration from Legacy CMS to Drupal
Migration from Legacy CMS to DrupalMigration from Legacy CMS to Drupal
Migration from Legacy CMS to DrupalRachel Jaro
 
Yet Another Drupal Development/Deployment Presentation
Yet Another Drupal Development/Deployment PresentationYet Another Drupal Development/Deployment Presentation
Yet Another Drupal Development/Deployment Presentationdigital006
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Acquia
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Drupal 6.x, Drupal 7.x -- Scratching the surface
Drupal 6.x, Drupal 7.x -- Scratching the surfaceDrupal 6.x, Drupal 7.x -- Scratching the surface
Drupal 6.x, Drupal 7.x -- Scratching the surfaceFlorian Latzel
 
Deployment of WebObjects applications on FreeBSD
Deployment of WebObjects applications on FreeBSDDeployment of WebObjects applications on FreeBSD
Deployment of WebObjects applications on FreeBSDWO Community
 
History of Drupal: From Drop 1.0 to Drupal 8
History of Drupal: From Drop 1.0 to Drupal 8History of Drupal: From Drop 1.0 to Drupal 8
History of Drupal: From Drop 1.0 to Drupal 8Websolutions Agency
 
drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010Florian Latzel
 
Drush und Multisite: drush_multi
Drush und Multisite: drush_multiDrush und Multisite: drush_multi
Drush und Multisite: drush_multiFlorian Latzel
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-BoxSuzanne Dergacheva
 
Drupal 6 to 7 migration guide
Drupal 6 to 7 migration guideDrupal 6 to 7 migration guide
Drupal 6 to 7 migration guideEbizon
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
 
[drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance![drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance!DrupalDay
 

Tendances (19)

Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7Taking your module from Drupal 6 to Drupal 7
Taking your module from Drupal 6 to Drupal 7
 
Plain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsPlain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticals
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Migration from Legacy CMS to Drupal
Migration from Legacy CMS to DrupalMigration from Legacy CMS to Drupal
Migration from Legacy CMS to Drupal
 
Yet Another Drupal Development/Deployment Presentation
Yet Another Drupal Development/Deployment PresentationYet Another Drupal Development/Deployment Presentation
Yet Another Drupal Development/Deployment Presentation
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
features+
features+features+
features+
 
Drupal 6.x, Drupal 7.x -- Scratching the surface
Drupal 6.x, Drupal 7.x -- Scratching the surfaceDrupal 6.x, Drupal 7.x -- Scratching the surface
Drupal 6.x, Drupal 7.x -- Scratching the surface
 
Deployment of WebObjects applications on FreeBSD
Deployment of WebObjects applications on FreeBSDDeployment of WebObjects applications on FreeBSD
Deployment of WebObjects applications on FreeBSD
 
History of Drupal: From Drop 1.0 to Drupal 8
History of Drupal: From Drop 1.0 to Drupal 8History of Drupal: From Drop 1.0 to Drupal 8
History of Drupal: From Drop 1.0 to Drupal 8
 
drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010
 
Drush und Multisite: drush_multi
Drush und Multisite: drush_multiDrush und Multisite: drush_multi
Drush und Multisite: drush_multi
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
 
Drupal 6 to 7 migration guide
Drupal 6 to 7 migration guideDrupal 6 to 7 migration guide
Drupal 6 to 7 migration guide
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
 
[drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance![drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance!
 

En vedette

Content migration - CSV to Drupal 8
Content migration -  CSV to Drupal 8Content migration -  CSV to Drupal 8
Content migration - CSV to Drupal 8Hector Iribarne
 
Bc Presentation Web 052810
Bc Presentation Web 052810Bc Presentation Web 052810
Bc Presentation Web 052810sfdeam
 
Fontface issue 1
Fontface issue 1 Fontface issue 1
Fontface issue 1 Gemmalea
 
Brendan mc grath presentation
Brendan mc grath presentationBrendan mc grath presentation
Brendan mc grath presentationGreen17Creative
 
149 amazing pictures
149 amazing pictures149 amazing pictures
149 amazing picturesthandastuff
 
คอมพิวเตอร์
คอมพิวเตอร์คอมพิวเตอร์
คอมพิวเตอร์deepre
 
Affective Assemblage: Documentary Practice
Affective Assemblage: Documentary PracticeAffective Assemblage: Documentary Practice
Affective Assemblage: Documentary Practicevogmae
 
Open hydro presentation workshop 20100507
Open hydro presentation   workshop 20100507Open hydro presentation   workshop 20100507
Open hydro presentation workshop 20100507Green17Creative
 
Delivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiDelivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiNorman Mayes
 
徐志摩的第一任妻子
徐志摩的第一任妻子徐志摩的第一任妻子
徐志摩的第一任妻子tswai
 
幸福..
幸福..幸福..
幸福..tswai
 
Project 2000
Project 2000Project 2000
Project 2000lexsing
 
Ostrava
OstravaOstrava
Ostravapesak
 

En vedette (20)

Migrate in Drupal 8
Migrate in Drupal 8Migrate in Drupal 8
Migrate in Drupal 8
 
Drupal 8 migrate!
Drupal 8 migrate!Drupal 8 migrate!
Drupal 8 migrate!
 
Content migration - CSV to Drupal 8
Content migration -  CSV to Drupal 8Content migration -  CSV to Drupal 8
Content migration - CSV to Drupal 8
 
Bc Presentation Web 052810
Bc Presentation Web 052810Bc Presentation Web 052810
Bc Presentation Web 052810
 
Lesson11math
Lesson11mathLesson11math
Lesson11math
 
Downloaddebat
DownloaddebatDownloaddebat
Downloaddebat
 
Tlhologelo cv
Tlhologelo cvTlhologelo cv
Tlhologelo cv
 
Fontface issue 1
Fontface issue 1 Fontface issue 1
Fontface issue 1
 
Brendan mc grath presentation
Brendan mc grath presentationBrendan mc grath presentation
Brendan mc grath presentation
 
149 amazing pictures
149 amazing pictures149 amazing pictures
149 amazing pictures
 
Communication
CommunicationCommunication
Communication
 
คอมพิวเตอร์
คอมพิวเตอร์คอมพิวเตอร์
คอมพิวเตอร์
 
Affective Assemblage: Documentary Practice
Affective Assemblage: Documentary PracticeAffective Assemblage: Documentary Practice
Affective Assemblage: Documentary Practice
 
Open hydro presentation workshop 20100507
Open hydro presentation   workshop 20100507Open hydro presentation   workshop 20100507
Open hydro presentation workshop 20100507
 
Delivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiDelivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefi
 
Happiness
HappinessHappiness
Happiness
 
徐志摩的第一任妻子
徐志摩的第一任妻子徐志摩的第一任妻子
徐志摩的第一任妻子
 
幸福..
幸福..幸福..
幸福..
 
Project 2000
Project 2000Project 2000
Project 2000
 
Ostrava
OstravaOstrava
Ostrava
 

Similaire à Migrate to Drupal 8

Migrate 140123161042-phpapp02
Migrate 140123161042-phpapp02Migrate 140123161042-phpapp02
Migrate 140123161042-phpapp02Gaurav Varshney
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Antonio Peric-Mazar
 
Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Eugenio Minardi
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security rightGábor Hojtsy
 
Drupal Migration
Drupal MigrationDrupal Migration
Drupal Migration永对 陈
 
Drupal security
Drupal securityDrupal security
Drupal securityJozef Toth
 
Drupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaDrupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaGábor Hojtsy
 
drupal 7 amfserver presentation: integrating flash and drupal
drupal 7 amfserver presentation: integrating flash and drupaldrupal 7 amfserver presentation: integrating flash and drupal
drupal 7 amfserver presentation: integrating flash and drupalrolf vreijdenberger
 
Android Development
Android DevelopmentAndroid Development
Android Developmentmclougm4
 
Drupal8 migrate
Drupal8 migrateDrupal8 migrate
Drupal8 migrateJohn Doyle
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Oscar Merida
 
A pain free migraine
A pain free migraineA pain free migraine
A pain free migraineDennis Solis
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesShabir Ahmad
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS DrupalMumbai
 
S2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchS2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchGunnar Hillert
 
Intro to Drupal Migrate for Site Builders
Intro to Drupal Migrate for Site BuildersIntro to Drupal Migrate for Site Builders
Intro to Drupal Migrate for Site BuildersSuzanne Dergacheva
 

Similaire à Migrate to Drupal 8 (20)

Migrate 140123161042-phpapp02
Migrate 140123161042-phpapp02Migrate 140123161042-phpapp02
Migrate 140123161042-phpapp02
 
Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)Drupal8 for Symfony Developers (PHP Day Verona 2017)
Drupal8 for Symfony Developers (PHP Day Verona 2017)
 
Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security right
 
Drupal Migration
Drupal MigrationDrupal Migration
Drupal Migration
 
Drupal security
Drupal securityDrupal security
Drupal security
 
Drupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaDrupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp Bratislava
 
drupal 7 amfserver presentation: integrating flash and drupal
drupal 7 amfserver presentation: integrating flash and drupaldrupal 7 amfserver presentation: integrating flash and drupal
drupal 7 amfserver presentation: integrating flash and drupal
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Drupal8 migrate
Drupal8 migrateDrupal8 migrate
Drupal8 migrate
 
Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)Staying Sane with Drupal (A Develper's Survival Guide)
Staying Sane with Drupal (A Develper's Survival Guide)
 
A pain free migraine
A pain free migraineA pain free migraine
A pain free migraine
 
Migrate
MigrateMigrate
Migrate
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS
 
Lecture02
Lecture02Lecture02
Lecture02
 
S2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchS2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring Batch
 
Intro to Drupal Migrate for Site Builders
Intro to Drupal Migrate for Site BuildersIntro to Drupal Migrate for Site Builders
Intro to Drupal Migrate for Site Builders
 

Dernier

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Dernier (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Migrate to Drupal 8

  • 3. update vs. upgrade what types drupal “renewing” we have?
  • 5. drupal update minor version update 7.24 > 7.25
  • 6. drupal update minor version update 7.24 > 7.25 drupal upgrade
  • 7. drupal update minor version update 7.24 > 7.25 drupal upgrade major version upgrade 7.x > 8.x
  • 8. drupal update minor version update 7.24 > 7.25 drupal upgrade major version upgrade 7.x > 8.x
  • 9. the migrate module “in service” since 2009 drupal.org/project/migrate
  • 10. the migrate module • How it worked? • Migrations = classes extending Migration. • Main elements: source, destination, map, mappings, “hooks” (prepareRow, prepare, complete, createStub, etc). • Each migration has to extend the Migration class or one of its successors.
  • 11.
  • 14. disclaimer • the migrate system is under heavy development right now.
  • 15. disclaimer • the migrate system is under heavy development right now. • some of the features or APIs may change in the future
  • 16. disclaimer • the migrate system is under heavy development right now. • some of the features or APIs may change in the future • not all the current work is pushed to 8.x.
  • 17. disclaimer • the migrate system is under heavy development right now. • some of the features or APIs may change in the future • not all the current work is pushed to 8.x. • The work is in the sandbox at https://drupal.org/sandbox/chx/2105305
  • 18. credits Károly Négyesi (chx) Mike Ryan (mikeryan) Moshe Weitzman (moshe weitzman) Ben Dougherty (benjy)
  • 20. note
  • 21. note • While a significant portion of the code and the interaction between the elements is brand new, the actual migrate-y code is coming straight from D7: highwater marks, track changes, id map, this is here to
  • 22. note • While a significant portion of the code and the interaction between the elements is brand new, the actual migrate-y code is coming straight from D7: highwater marks, track changes, id map, this is here to • The new interaction allows for really nice and powerful migrations but at the same time we are most definitely not reinventing wheel.
  • 26. Migrate core/modules/migrate/ • provides general API for all migrations • provides interfaces and base classes for all migration plugin components (source, destination, process, id_map, row).
  • 27. Migrate core/modules/migrate/ • provides general API for all migrations • provides interfaces and base classes for all migration plugin components (source, destination, process, id_map, row). • provides a plugin manager for manipulation on migration plugins.
  • 28. Migrate core/modules/migrate/ • provides general API for all migrations • provides interfaces and base classes for all migration plugin components (source, destination, process, id_map, row). • provides a plugin manager for manipulation on migration plugins. • provides the migrate configurable (configuration entity type).
  • 30. Migrate Drupal core/modules/migrate_drupal/ • the first module using the new Migrate API.
  • 31. Migrate Drupal core/modules/migrate_drupal/ • the first module using the new Migrate API. • kind of migrate_d2d successor.
  • 32. Migrate Drupal core/modules/migrate_drupal/ • the first module using the new Migrate API. • kind of migrate_d2d successor. • migrates out-of-the-box from Drupal 6 and 7 into Drupal 8.
  • 33. Migrate Drupal core/modules/migrate_drupal/ • the first module using the new Migrate API. • kind of migrate_d2d successor. • migrates out-of-the-box from Drupal 6 and 7 into Drupal 8. • Defines migrations for all system components:
  • 34. Migrate Drupal core/modules/migrate_drupal/ • the first module using the new Migrate API. • kind of migrate_d2d successor. • migrates out-of-the-box from Drupal 6 and 7 into Drupal 8. • Defines migrations for all system components: • Drupal 6 settings (site name, slogan, roles, etc)
  • 35. Migrate Drupal core/modules/migrate_drupal/ • the first module using the new Migrate API. • kind of migrate_d2d successor. • migrates out-of-the-box from Drupal 6 and 7 into Drupal 8. • Defines migrations for all system components: • Drupal 6 settings (site name, slogan, roles, etc) • Content definitions (vocabularies, node types, etc)
  • 36. Migrate Drupal core/modules/migrate_drupal/ • the first module using the new Migrate API. • kind of migrate_d2d successor. • migrates out-of-the-box from Drupal 6 and 7 into Drupal 8. • Defines migrations for all system components: • Drupal 6 settings (site name, slogan, roles, etc) • Content definitions (vocabularies, node types, etc) • Content (noded, terms, users, etc).
  • 40. what is a configurable?
  • 41. what is a configurable? • “Configurables” are configuration entities.
  • 42. what is a configurable? • “Configurables” are configuration entities. • In Drupal 8 the content is separated from configuration. Both are classes and are sharing the same ancestor: the Entity class.
  • 43. what is a configurable? • “Configurables” are configuration entities. • In Drupal 8 the content is separated from configuration. Both are classes and are sharing the same ancestor: the Entity class. DrupalCoreEntityEntity
  • 44. what is a configurable? • “Configurables” are configuration entities. • In Drupal 8 the content is separated from configuration. Both are classes and are sharing the same ancestor: the Entity class. DrupalCoreEntityContentEntityBase DrupalCoreEntityEntity
  • 45. what is a configurable? • “Configurables” are configuration entities. • In Drupal 8 the content is separated from configuration. Both are classes and are sharing the same ancestor: the Entity class. DrupalCoreEntityContentEntityBase DrupalCoreEntityEntity DrupalCoreConfigConfigEntityBase
  • 46. what is a configurable? • “Configurables” are configuration entities. • In Drupal 8 the content is separated from configuration. Both are classes and are sharing the same ancestor: the Entity class. DrupalCoreEntityContentEntityBase DrupalCoreEntityEntity DrupalCoreConfigConfigEntityBase
  • 47. what is a configurable? • • • • A configurable is the way Drupal 8 stores the configuration of a specific functionality. E.g. the the definition of a node type is stored in a configuration entity of type “node_type”. Configuration entity types are annotated classes, meaning that the object meta information is stored in annotation rather than in info hooks - as it was in Drupal <= 7. Imagine configurables as entities storing their data in config YAML files rather than DB. The “fields” of a configurable are the public properties exposed by the configurable object.
  • 48. what is a configurable?
  • 50. migration plugins parts implemented by specific migrations
  • 51. source plugins • plugins returning information and data from the source of migration. • usually: the list of fields, the source iterator (used retrieve data from source). • each migration should configure a source.
  • 52. destination plugins • are handling data at the destination: import, rollback. • different plugins for different destination components: entity, config, etc. • are defined in the base module (migrate) as destination is always drupal 8 but if necessary it can be extended. • each migration should specify a destination.
  • 53. id map plugin • plugins of this type are handling and storing the • • • relation between primary IDs of source and destination. without this, rollback and continuous migrations are impossible. in 99% of the cases you’ll use the sql id map plugin (Sql) that keeps the map of each migration in a table. table name migrate_map_MIGRATION_ID
  • 54. processors • plugins that are performing small but very specialized operations against values to be migrated. • Some simple examples: DefaultValue, Concat, etc. • The most important interface method: transform().
  • 55. the anatomy of a migration migrating user roles from a dupal 6 site
  • 56. creating the config file config/migrate.migration.d6_user_role.yml relative to core/modules/migrate_drupal
  • 58. config .yml file content • id: same as the last part of filename (d6_user_role)
  • 59. config .yml file content • id: same as the last part of filename (d6_user_role) • sourceIds: Source fields, providing a primary ID.
  • 60. config .yml file content • id: same as the last part of filename (d6_user_role) • sourceIds: Source fields, providing a primary ID. • source: configure the source of data, usually the source plugin to be used
  • 61. config .yml file content • id: same as the last part of filename (d6_user_role) • sourceIds: Source fields, providing a primary ID. • source: configure the source of data, usually the source plugin to be used • process: describe the list of processors to be applied per destination field.
  • 62. config .yml file content • id: same as the last part of filename (d6_user_role) • sourceIds: Source fields, providing a primary ID. • source: configure the source of data, usually the source plugin to be used • process: describe the list of processors to be applied per destination field. • destination: destination configuration, usually the destination plugin.
  • 63. id
  • 64. id • this is the configurable unique id.
  • 65. id • this is the configurable unique id. • it must be exactly as the same as the last part of filename: d6_user_role.
  • 66. id • this is the configurable unique id. • it must be exactly as the same as the last part of filename: d6_user_role. id: d6_user_role
  • 68. sourceIds • look in D6 schema to find the role primary ID.
  • 69. sourceIds • look in D6 schema to find the role primary ID. • lines 107 - 115 of drupal/modules/user/user.install.
  • 70. sourceIds • look in D6 schema to find the role primary ID. • lines 107 - 115 of drupal/modules/user/user.install. $schema['role'] = array( 'description' => 'Stores user roles.',   'fields' => array(    'rid' => array(     'type' => 'serial',     'unsigned' => TRUE,     'not null' => TRUE,     'description' => 'Primary Key: Unique role id.',
  • 72. sourceIds • use TypedData identifiers for data type.
  • 73. sourceIds • use TypedData identifiers for data type. • Here are the .yml lines that we need to add.
  • 74. sourceIds • use TypedData identifiers for data type. • Here are the .yml lines that we need to add. sourceIds:    rid:     type: integer
  • 75. sourceIds • use TypedData identifiers for data type. • Here are the .yml lines that we need to add. sourceIds:    rid:     type: integer Note: sourceIds will be removed in the near future and the source plugin will set also the primary id.
  • 77. source • we need to implement a source plugin first, that provides the list of fields and the iterator by querying the D6 backend.
  • 78. source • we need to implement a source plugin first, that provides the list of fields and the iterator by querying the D6 backend. • let’s see how it should look (code).
  • 79. source • we need to implement a source plugin first, that provides the list of fields and the iterator by querying the D6 backend. • let’s see how it should look (code). • add the source plugin id in the configuration .yml file.
  • 80. source • we need to implement a source plugin first, that provides the list of fields and the iterator by querying the D6 backend. • let’s see how it should look (code). • add the source plugin id in the configuration .yml file. source:   plugin: drupal6_user_role
  • 82. process • process keys are destination “fields”.
  • 83. process • process keys are destination “fields”. • for configurables: the public properties (except uuid)
  • 84. process • process keys are destination “fields”. • for configurables: the public properties (except uuid) • for content: the keys from baseFieldDefinitions
  • 85. process • process keys are destination “fields”. • for configurables: the public properties (except uuid) • for content: the keys from baseFieldDefinitions • let’s see how it looks! (code).
  • 86. process • process keys are destination “fields”. • for configurables: the public properties (except uuid) • for content: the keys from baseFieldDefinitions • let’s see how it looks! (code). process:   id:   label:   weight:   permissions:
  • 88. destination • should point to the destination plugin.
  • 89. destination • should point to the destination plugin. • in this case we’re importing into user_role entity, so we’re passing also the entity_type argument.
  • 90. destination • should point to the destination plugin. • in this case we’re importing into user_role entity, so we’re passing also the entity_type argument. destination: plugin: entity entity_type: user_role
  • 91. running a migration • via drush • There will be a brief UI implemented in core (to come!)
  • 93. final notes • Minor version updates are unchanged. Developers continue to use hook_update_N() for those.
  • 94. final notes • Minor version updates are unchanged. Developers continue to use hook_update_N() for those. • Contrib and custom modules are encouraged to ship with migrations of their data from D6/D7 to D8. Use core modules as model.
  • 95. final notes • Minor version updates are unchanged. Developers continue to use hook_update_N() for those. • Contrib and custom modules are encouraged to ship with migrations of their data from D6/D7 to D8. Use core modules as model. • The underlying Migrate API is source-agnostic.You can easily migrate into D8 from MS SQL, Oracle, piles of HTML files, XML feeds, CSV files, etc.
  • 96. final notes • Minor version updates are unchanged. Developers continue to use hook_update_N() for those. • Contrib and custom modules are encouraged to ship with migrations of their data from D6/D7 to D8. Use core modules as model. • The underlying Migrate API is source-agnostic.You can easily migrate into D8 from MS SQL, Oracle, piles of HTML files, XML feeds, CSV files, etc. • Similarly, Drupal 4.x and Drupal 5.x sites are able to migrate using this same approach.