Problem/Motivation

Migrate's SqlBase class depends on global state - a hard-coded 'migrate' database connection which must be defined elsewhere (settings.php or explicit addConnectionInfo). This limits the flexibility of the class (for one thing, it means all migrations can only use the one connection, you can't have migrations from multiple databases), and could conflict with environments that define a 'migrate' connection for other reasons.

Proposed resolution

The class already supports a 'target' configuration key for the connection target - add 'key' for the connection key, and 'database' for a database info array to define the connection.

Remaining tasks

Submit the patch.

User interface changes

None.

API changes

Configuration additions:

  • key - Connection key string, if omitted default to 'migrate' as today.
  • database - A database information array as one would find in settings.php. If present, passed to Database::addConnectionInfo() to define the connection.
CommentFileSizeAuthor
#1 support_injection_of-2404397-1.patch3.74 KBmikeryan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeryan’s picture

Status: Active » Needs review
FileSize
3.74 KB
mikeryan’s picture

Issue summary: View changes
mikeryan’s picture

benjy’s picture

Assigned: mikeryan » Unassigned
Status: Needs review » Reviewed & tested by the community

Looks good to me.

alexpott’s picture

Category: Feature request » Task
Status: Reviewed & tested by the community » Fixed

Me too. Migrate changes are not frozen in beta. Committed d394fef and pushed to 8.0.x. Thanks!

This is not really a feature.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.