Generating database fixtures for D8 Migrate tests

When writing tests for your D6 / D7 to D8 core migrations, use the database fixtures that are included in Drupal 8 core:
* core/modules/migrate_drupal/tests/fixtures/drupal6.php
* core/modules/migrate_drupal/tests/fixtures/drupal7.php

This is your D6 / D7 source data to write your tests against. If you need extra test data in these database sources, you can modify the fixture using the following method.

How to create nodes with hierarchical terms from excel

The purpose of this cookbook is to show how to create node from a excel documents via csv files.
The example we use is a list of stores with name, adress and three column to convert to terms a state,capital ubication and a kind of store column.

Create migrate module

First thing we are going to do is make a tipically module named migratestores.

Migration of Image Attach module

image attach is part of image module and creates a unique node for each image in your content type. Although best solution for creating images on Drupal 6 is using CCK file and image fields but many sites chose the other approach. Here comes the problem, migrate_d2d understands CCK structure but not other solutions and you need to write a custom class for this reason.

A bird's eye view of migrate structure

Migrate Classes

  • Migration [base]
  • MigrateSource
  • MigrateDestination
  • MigrateMap
  • MigrateFieldMapping

Source Classes

  • MigrateSourceSQL
  • MigrateSourceList
  • MigrateSourceMultiitems
  • MigrateSourceXML
  • MigrateSourceCSV
  • MigrateSourceMSSQL
  • MigrateSourceOracle
  • MigrateSourceMongoDB
  • MigrateListJSON and MigrateItemJSON
  • MigrateListFile and MigrateItemFile

Destination Classes

  • MigrateDestinationRole

Migrating from static HTMLs with i18n

Some key points in migrating static HTML pages to Drupal 7 with the full i18n (Internationalization) features incorporated are described.
Drupal's i18n feature is powerful and has a great flexibility. However the flip-side of the coin is it is not that easy to understand how it works, partly because it heavily depends on your configuration. Also, it may not match well the suffix-based language negotiation by the Apache server for the static HTML pages, and so the migration of such static HTML sites to Drupal is not quite straightforward.

Preparing an upgrade

Prior to upgrading your Drupal 6 or Drupal 7 site to Drupal 8, it is recommended that you take a few steps to ensure the process will be smooth and have the desired results.


Subscribe with RSS Subscribe to RSS - migrate