Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ParisLiakos’s picture

Status: Active » Needs review
FileSize
7.94 KB

Patch attached

agentrickard’s picture

I'm tempted to suggest we spin off Migration support. If the code keeps expanding to cover all the modules, I can't keep up with it.

Nice patch, though. What's the use-case for this?

ParisLiakos’s picture

Hmm no need to maintain them, let them leave in there, community will do its job. Not to mention that they are a separate part, that does not affect module functionality. Any ways if you still dont like it there is always the migrate_extras module;)
I am also preparing a patch for domain_menu_block now, will be in its issue queue shortly.

I am migrating an old custom cms with about 300 domains and 1,2k aliases...
and i was so lucky that you recently added migrate support, thanks:D

ParisLiakos’s picture

Fixing wrong variable name when updating counters

agentrickard’s picture

Looks pretty good. I don't know how hard support will be. Migrate is fairly stable, so once this works we should be able to add it without too much hassle.

I don't know that the migrate_extras team would want to support this either, since testing DA can be a challenge.

ParisLiakos’s picture

well tbh, i doubt you will have any bug reports, or it waste your time.
like you said, migrate is very stable, your database fields that need mapping to it dont change everyday and people that use migrate are coders that know their way around, so no support requests as well.

And thats true DA is a challenge:)

Anyways it is your decision!

If you decide you dont want it, i will transfer this patch to migrate extras queue and test my luck there.

Cheers

agentrickard’s picture

I'm going to release the other migrate code first, and then we'' let other people test this one out and see.

ParisLiakos’s picture

reroll for the .info changes

agentrickard’s picture

I wonder if we can key this to machine_name instead of domain_id, or if that doesn't work for most use-cases?

Is it possible at least to use machine_name as a lookup key?

ParisLiakos’s picture

Status: Needs review » Needs work

yes, it would be possible to take the machine_name, load the domain and extract the id to store in the table..hmm that would make more sense, cause you could then map imported domains easier..right now i have to do:

  public function prepare($domain_alias, stdClass $row) {
    $domain_alias->domain_id = db_query('SELECT domain_id FROM {domain} WHERE machine_name = :machine_name', array(':machine_name' => $domain_alias->domain_id))->fetchField();
  }

in my domain alias migration..
+1, patch will follow some day

agentrickard’s picture

I would think we need to support both lookup methods, because people might have source data in either format. Though if the domain_id is a reference to a previous import, that is less difficult.