Problem/Motivation

It could be nice to be able to migrate Follow data from Drupal 6 to Drupal 7.
migrate and migrate_d2d provide a non-intrusive framework to handle such a migration.

Proposed resolution

The migration is straightforward as Follow data lies in a single table and the schema is the same in D6 and D7.
See patch.

Remaining tasks

The patch can be reviewed.
Test plan (this page can also help):

  1. Apply the patch against 7.x-2.x
  2. In settings.php of the D7 site, create a reference to the D6 database:
    // Customize with your D6 credentials.
    $databases['d6']['default'] = array(
      'driver' => 'mysql',
      'database' => 'myd6database',
      'username' => 'myd6username',
      'password' => 'myd6password',
      'host' => 'myd6localhost',
    );
    
  3. In another module, create a file mymodule.migrate.inc and declare the migration. Migrate will load the file automatically:
    // mymodule.migrate.inc
    
    /**
     * Implement hook_migrate_api().
     */
    function mymodule_migrate_api() {
      return array(
        'api' => 2,
        'groups' => array(
          'follow' => array(
            'title' => t('Follow'),
          ),
        ),
        'migrations' => array(
          'follow' => array(
            'group_name' => 'follow',
            'source_connection' => 'd6', // Name of Drupal 6 DB connection as in your settings.php
            'source_version' => 6,
            'class_name' => 'FollowMigration',
            'description' => t('Migration of Follow configuration'),
            'machine_name' => 'FollowMigration',
            //'user_migration' => 'MyUserMigration', // Optional, if you have a user migration.
          ),
        ),
      );
    }
    
  4. Enable migrate and migrate_d2d
  5. Clear the cache
  6. Go to admin/content/migrate/configure and register classes
  7. Go to admin/content/migrate and run the migration
CommentFileSizeAuthor
follow-migrate_support.patch2.79 KBfengtan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fengtan’s picture

Issue summary: View changes
AstonVictor’s picture

Status: Needs review » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks