SlideShare ist ein Scribd-Unternehmen logo
1 von 97
Downloaden Sie, um offline zu lesen
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 upgrade
drupal update
minor version update
7.24 > 7.25
drupal upgrade
drupal update
minor version update
7.24 > 7.25
major version upgrade
7.x > 8.x
drupal upgrade
drupal update
minor version update
7.24 > 7.25
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?
• “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.
what is a configurable?
DrupalCoreEntityEntity
• “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?
DrupalCoreEntityEntity
DrupalCoreEntityContentEntityBase
• “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?
DrupalCoreEntityEntity
DrupalCoreEntityContentEntityBase
DrupalCoreConfigConfigEntityBase
• “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?
DrupalCoreEntityEntity
DrupalCoreEntityContentEntityBase
DrupalCoreConfigConfigEntityBase
• 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
configYAML files rather than DB.
• The “fields” of a configurable are the public properties
exposed by the configurable object.
what is a configurable?
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.

Weitere ähnliche Inhalte

Was ist angesagt?

Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
guest11106b
 
Advanced
AdvancedAdvanced
Advanced
mxmxm
 
Scala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on HerokuScala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on Heroku
Havoc Pennington
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Raffi Khatchadourian
 

Was ist angesagt? (20)

Hibernate inheritance and relational mappings with examples
Hibernate inheritance and relational mappings with examplesHibernate inheritance and relational mappings with examples
Hibernate inheritance and relational mappings with examples
 
Hibernate architecture
Hibernate architectureHibernate architecture
Hibernate architecture
 
Owner - Java properties reinvented.
Owner - Java properties reinvented.Owner - Java properties reinvented.
Owner - Java properties reinvented.
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
 
Synthetic models
Synthetic modelsSynthetic models
Synthetic models
 
Effiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und HibernateEffiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und Hibernate
 
Hibernate presentation
Hibernate presentationHibernate presentation
Hibernate presentation
 
Advanced
AdvancedAdvanced
Advanced
 
Jpa
JpaJpa
Jpa
 
Java Hibernate Programming with Architecture Diagram and Example
Java Hibernate Programming with Architecture Diagram and ExampleJava Hibernate Programming with Architecture Diagram and Example
Java Hibernate Programming with Architecture Diagram and Example
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
 
Scala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on HerokuScala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on Heroku
 
Spring Data in 10 minutes
Spring Data in 10 minutesSpring Data in 10 minutes
Spring Data in 10 minutes
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
Hibernate Basic Concepts - Presentation
Hibernate Basic Concepts - PresentationHibernate Basic Concepts - Presentation
Hibernate Basic Concepts - Presentation
 
A first Draft to Java Configuration
A first Draft to Java ConfigurationA first Draft to Java Configuration
A first Draft to Java Configuration
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
 
Hibernate in Action
Hibernate in ActionHibernate in Action
Hibernate in Action
 
CDI 2.0 Deep Dive
CDI 2.0 Deep DiveCDI 2.0 Deep Dive
CDI 2.0 Deep Dive
 
Alternatives of JPA/Hibernate
Alternatives of JPA/HibernateAlternatives of JPA/Hibernate
Alternatives of JPA/Hibernate
 

Andere mochten auch

How to make a jing video
How to make a jing videoHow to make a jing video
How to make a jing video
libero94
 

Andere mochten auch (11)

Pitch WOWideamaker App
Pitch WOWideamaker AppPitch WOWideamaker App
Pitch WOWideamaker App
 
Kishore ems resume
Kishore ems resumeKishore ems resume
Kishore ems resume
 
DSLR & Vídeo. Una introducció a la creació videogràfica.
DSLR & Vídeo. Una introducció a la creació videogràfica.DSLR & Vídeo. Una introducció a la creació videogràfica.
DSLR & Vídeo. Una introducció a la creació videogràfica.
 
Children’s music genre analysis
Children’s music genre analysisChildren’s music genre analysis
Children’s music genre analysis
 
UE4 Workshop
UE4 WorkshopUE4 Workshop
UE4 Workshop
 
Fishing Grounds of the Gulf 1 04
Fishing Grounds of the Gulf  1 04Fishing Grounds of the Gulf  1 04
Fishing Grounds of the Gulf 1 04
 
Robotic Arm Allowing a Diabetic Quadriplegic Patient to Self-Administer Insulin
Robotic Arm Allowing a Diabetic Quadriplegic Patient to Self-Administer InsulinRobotic Arm Allowing a Diabetic Quadriplegic Patient to Self-Administer Insulin
Robotic Arm Allowing a Diabetic Quadriplegic Patient to Self-Administer Insulin
 
Informática
InformáticaInformática
Informática
 
Improving the Design of Blood Pressure and Blood Saturation Monitors
Improving the Design of Blood Pressure and Blood Saturation MonitorsImproving the Design of Blood Pressure and Blood Saturation Monitors
Improving the Design of Blood Pressure and Blood Saturation Monitors
 
Exploiting Kinetic and Kinematic Data to Plot Cyclograms for Managing the Reh...
Exploiting Kinetic and Kinematic Data to Plot Cyclograms for Managing the Reh...Exploiting Kinetic and Kinematic Data to Plot Cyclograms for Managing the Reh...
Exploiting Kinetic and Kinematic Data to Plot Cyclograms for Managing the Reh...
 
How to make a jing video
How to make a jing videoHow to make a jing video
How to make a jing video
 

Ähnlich wie Migrate 140123161042-phpapp02

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
Drupalcon Paris
 
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
NLJUG
 

Ähnlich wie Migrate 140123161042-phpapp02 (20)

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)
 
Doing Drupal security right
Doing Drupal security rightDoing Drupal security right
Doing Drupal security right
 
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
 
Drupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp BratislavaDrupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp Bratislava
 
Drupal security
Drupal securityDrupal security
Drupal security
 
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
 
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
 
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)
 
Drupal Migration
Drupal MigrationDrupal Migration
Drupal Migration
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
Drupal8 migrate
Drupal8 migrateDrupal8 migrate
Drupal8 migrate
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Open event presentation.3 2
Open event presentation.3 2Open event presentation.3 2
Open event presentation.3 2
 
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
Modularity and Domain Driven Design; a killer Combination? - Tom de Wolf & St...
 
Drupal migrate-june2015
Drupal migrate-june2015Drupal migrate-june2015
Drupal migrate-june2015
 
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
 
A pain free migraine
A pain free migraineA pain free migraine
A pain free migraine
 

Kürzlich hochgeladen

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 

Kürzlich hochgeladen (20)

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 

Migrate 140123161042-phpapp02

  • 3. update vs. upgrade what types drupal “renewing” we have?
  • 5. drupal update minor version update 7.24 > 7.25
  • 6. drupal upgrade drupal update minor version update 7.24 > 7.25
  • 7. drupal upgrade drupal update minor version update 7.24 > 7.25 major version upgrade 7.x > 8.x
  • 8. drupal upgrade drupal update minor version update 7.24 > 7.25 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).
  • 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. • “Configurables” are configuration entities. what is a configurable?
  • 42. • “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?
  • 43. • “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? DrupalCoreEntityEntity
  • 44. • “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? DrupalCoreEntityEntity DrupalCoreEntityContentEntityBase
  • 45. • “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? DrupalCoreEntityEntity DrupalCoreEntityContentEntityBase DrupalCoreConfigConfigEntityBase
  • 46. • “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? DrupalCoreEntityEntity DrupalCoreEntityContentEntityBase DrupalCoreConfigConfigEntityBase
  • 47. • 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 configYAML files rather than DB. • The “fields” of a configurable are the public properties exposed by the configurable object. what is a configurable?
  • 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.