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.
I'm not sure if this is a migrate issue, or a commerce_migrate issue, so I apologize for posting here as well.
While trying to migrate my products csv into commerce products, I get an error that destid2 is missing, because it obviously is. The products are still generated, but the migrate map has null values, which means updating will not go as planned.
Simply creating the column 'destid2' resolves the problem, but this wasn't required until a recent migrate update.
Comments
Comment #1
mikeryanSounds like another instance of #1175304: warn if map/message tables are out of sync with key schema - if when you first instantiate the migration the destination key has one column, and later another one is added, the map table is not altered to add the second key. The simplest thing to do in this case is, assuming there's no imported data (the map table is empty), just drop the table and the next migration operation will recreate it with the right keys.
Comment #2
killtheliterate CreditAttribution: killtheliterate commentedSorry to re-open this a while after the fact, but I've done what you've suggested, and still, the migration thinks that there needs to be a destid2. I'm not sure where this is getting definited, but it's possible that commerce_migrate is somehow requiring this column, but delegating the migrate map creation to migrate. As said before, if I do manually create this column, the data that appears is duplicate of destid1.
Comment #3
killtheliterate CreditAttribution: killtheliterate commentedTurns out I was using the Migration destination, which, due to a commerce_migrate update, made my migrations begin to fail. I was originally able to successfully use
MigrateDestinationNode::getKeySchema()
, but the commerce_migrate update required that I change that toMigrateDestinationEntityAPI::getKeySchema('commerce_product')
Comment #4
PieterDCThanks for reporting this, @killtheliterate.
Thanks for your hint, @mikeryan.
It helped me.