Hong Kong Drupal User Group - 2014 April 12th

331 views

Published on

Working with Migrate API

Published in: Technology, Health & Medicine
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
331
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Hong Kong Drupal User Group - 2014 April 12th

  1. 1. Hong Kong Drupal User Group (HKDUG) Working with Migrate API 2014 April 12th
  2. 2. Edison Wong ● CEO, PantaRei Design – hswong3i@pantarei-design.com ● Drupal developer & contributor – https://drupal.org/user/33940 ● HKDUG Co-founder – https://groups.drupal.org/drupalhk ● Startup founder – 2009 - PantaRei Design founded – 2010 - YBHK applicant – 2011 - ITF SERAP applicant – 2011 - HKSTP Incu-Tech applicant
  3. 3. PantaRei Design ● Hong Kong based Free and Open Source Software (FOSS) service provider – Content Management System (CMS) with Drupal – Cloud hosting with Amazon Web Services (AWS) ● Business Partnership – 2012 - AWS Consulting Partner – 2013 - Acquia Partner – 2013 - Atlassian Experts – 2014 - Rackspace Hosting Partner ● FOSS Contributor – 2008 - Hong Kong Drupal User Group Co-founder – 2012 - Drupal Services Provider
  4. 4. Outline ● What is Drupal? ● What is Migrate API? ● Drupal-to-Drupal Data Migration ● Advanced Migration Logic ● Improved Upgrade Process on Drupal 8
  5. 5. What is Drupal? ● Drupal is an open-source platform and content management system (CMS) for building dynamic web sites ● Distributed under the terms of the GNU General Public License (or "GPL"), which means anyone is free to download it and share it with others ● To easily organize, manage and publish your content, with an endless variety of customization
  6. 6. Evaluate Drupal Project Online ● http://simplytest.me/ ● On-demand sandbox environments ● No overhead for setup LAMP stack ● Simple, fast and for free! ● Let's try it now! – http://simplytest.me/project/drupal/7.x – http://simplytest.me/project/drupal/8.x – http://simplytest.me/project/drustack/7.x-26.x
  7. 7. Evaluate Drupal Project Online (cont.) ● Check “Status report” page ● Add new article ● Add new main menu link ● Add new block to region ● Add new user ● Change look & feel (theme) ● Change system settings
  8. 8. What is Migrate API? ● https://drupal.org/project/migrate ● Framework for migrating content into Drupal from other sources ● Support source: PDO, XML, CSV, JSON, MSSQL, Oracle, etc – Extendable for other sources ● Destination support: Node, User, Taxonomy Term, Comment, File, etc – Extendable for other destination
  9. 9. What is Migrate API? (cont.) ● Object-oriented Architecture ● Map tables maintain relationships between source/destination – i.e. Support rollback ● Support migrate dependencies management ● Support Web UI ● Support drush
  10. 10. Drupal-toDrupal Data Migration ● https://drupal.org/project/migrate_d2d ● Migrate API suppose setup with code ● Drupal-to-Drupal Data Migration simplify this specific use case with Web UI ● No custom code is required for general migration
  11. 11. Advanced Migration Logic ● MigrateSource – Represents the source data – The Migration class iterates over row objects generated by this class ● MigrateDestination – Represents the destination object (user, node, etc.) – Each row produced by MigrateSource is manipulated and passed on to the destination class to create the object ● MigrateMap – Represents the relationship between source and destination objects, keeping track of precisely which source data record resulted in the creation of which Drupal object. ● MigrateFieldMapping – Represents a mapping between a source field and a destination field – A typical Migration subclass will contain several field mappings.
  12. 12. Improved Upgrade Process on Drupal 8 ● Support migration path from both Drupal 6/7 ● Major version upgrade handled by Migrate API ● Minor version update handled by hook_update_N() ● Note that migration support in Drupal 8 is currently only partially implemented.
  13. 13. Q&A
  14. 14. I Need More Help! ● Read documents from Drupal Community – https://drupal.org/documentation ● Join Hong Kong Drupal User Group – Event organizing: http://www.meetup.com/drupalhk – Technological discussion: https://groups.drupal.org/drupalhk – Business connection: http://www.linkedin.com/groups/?gid=6644792 – General sharing: https://www.facebook.com/groups/drupalhk ● Contact us for one (1) month free-trial support service – http://pantarei-design.com/services/support/#support-service-plans
  15. 15. Thank You ● Please feel free to contact us: – Unit 207, 2/F IC Development Centre, No.6 Science Park West Avenue, Hong Kong Science Park, Shatin, N.T. – +852 3576 3812 – http://pantarei-design.com/ – sales@pantarei-design.com

×