Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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):
- Apply the patch against 7.x-2.x
- 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', );
- 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. ), ), ); }
- Enable migrate and migrate_d2d
- Clear the cache
- Go to
admin/content/migrate/configure
and register classes - Go to
admin/content/migrate
and run the migration
Comment | File | Size | Author |
---|---|---|---|
follow-migrate_support.patch | 2.79 KB | fengtan |
Comments
Comment #1
fengtanComment #2
AstonVictor CreditAttribution: AstonVictor as a volunteer and at DevBranch commentedI'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