Hong Kong Drupal User Group - 2014 April 12th

Embed Size (px)

Citation preview

Hong Kong Drupal User Group
(HKDUG)

Working with Migrate API

2014 April 12th

Edison Wong

CEO, PantaRei [email protected]

Drupal developer & contributorhttps://drupal.org/user/33940

HKDUG Co-founderhttps://groups.drupal.org/drupalhk

Startup founder2009 - PantaRei Design founded

2010 - YBHK applicant

2011 - ITF SERAP applicant

2011 - HKSTP Incu-Tech applicant

PantaRei Design

Hong Kong based Free and Open Source Software (FOSS) service providerContent Management System (CMS) with Drupal

Cloud hosting with Amazon Web Services (AWS)

Business Partnership2012 - AWS Consulting Partner

2013 - Acquia Partner

2013 - Atlassian Experts

2014 - Rackspace Hosting Partner

FOSS Contributor2008 - Hong Kong Drupal User Group Co-founder

2012 - Drupal Services Provider

Outline

What is Drupal?

What is Migrate API?

Drupal-to-Drupal Data Migration

Advanced Migration Logic

Improved Upgrade Process on Drupal 8

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

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

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

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, etcExtendable for other sources

Destination support: Node, User, Taxonomy Term, Comment, File, etcExtendable for other destination

What is Migrate API? (cont.)

Object-oriented Architecture

Map tables maintain relationships between source/destinationi.e. Support rollback

Support migrate dependencies management

Support Web UI

Support drush

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

Advanced Migration Logic

MigrateSourceRepresents the source data

The Migration class iterates over row objects generated by this class

MigrateDestinationRepresents the destination object (user, node, etc.)

Each row produced by MigrateSource is manipulated and passed on to the destination class to create the object

MigrateMapRepresents the relationship between source and destination objects, keeping track of precisely which source data record resulted in the creation of which Drupal object.

MigrateFieldMappingRepresents a mapping between a source field and a destination field

A typical Migration subclass will contain several field mappings.

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.

Q&A

I Need More Help!

Read documents from Drupal Communityhttps://drupal.org/documentation

Join Hong Kong Drupal User GroupEvent 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 servicehttp://pantarei-design.com/services/support/#support-service-plans

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/

[email protected]