Support D6->D7 migration (patch provided)

Created on 4 July 2014, over 10 years ago
Updated 18 April 2024, 8 months ago

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
✨ Feature request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada fengtan Montreal, Canada

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    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

Production build 0.71.5 2024