Closed (fixed)
Project:
Commerce Migrate
Version:
8.x-2.x-dev
Component:
Commerce Migrate Ubercart
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Apr 2017 at 07:49 UTC
Updated:
30 Jun 2017 at 12:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
quietone commentedThis is not complete, the address, owner and billing_countries need to be figured out.
If you want to work on this patch, and you want to use a test fixture, use the one at #2871811: New complete fixture for Ubercart D6 schema.
Comment #3
quietone commentedGrrr, this is the wrong patch.
Comment #4
quietone commentedHere is the right patch. Still needs some variables, namely the address, migrated. Not sure why the address isn't being saved.
Comment #5
quietone commentedComment #6
quietone commentedAdding the address migration. To run the tests get the latest patch at #2871811: New complete fixture for Ubercart D6 schema.
Still to investigate: owner, billing countries and adding the store migration as a dependency on other d6 ubercart migrations.
Comment #7
quietone commentedMerged d6 and d7 store migration.
To run the tests get the latest patch at #2871811: New complete fixture for Ubercart D6 schema and #2871812: New complete fixture for Ubercart D7 schema.
Still to investigate: owner, billing countries and adding the store migration as a dependency on other ubercart migrations.
Comment #8
quietone commentedThe currency code is migrated, but the currency may not be installed. Maybe a new migration to add all the currencies that exist on the source site.
Comment #9
quietone commentedAdding the dependency to currency here.
Comment #10
quietone commentedThese migrations need a source provider defined. And there are new line errors in the patch.
Comment #11
quietone commentedAdd the source provider.
Next, is to add this as a dependency of other migrations.
Comment #12
quietone commentedI seem to be all thumbs today, let's see if this passes tests.
Comment #13
quietone commentedHow to run tests? Or is this another manifestation of my 'all thumbs' day?
Comment #14
quietone commentedYep, all thumbs,
Comment #18
quietone commentedThat was not my fingers, HEAD moved at the same minute I uploaded the patch.
Here is the reroll.
Comment #20
quietone commentedForgot to test d7. Just needed to add the currency migration to the test.
Comment #21
quietone commentedFix comments, add the uid migration to the d7 store migration and update the test.
Comment #22
mglamanShouldn't all Ubercart migrations have this dependency?
Why not add the store migration here instead of another helper?
Orders technically must belong to a store.
See previous, why we don't add store to migration. Or does it now resolve dependencies and run them?
Comment #23
quietone commented1,3,4. About dependencies, migrate will figure it out. We don't need to add d6_ubercart_store to every migrations. Just thinking about having to add every needed migration to a new migration makes my head hurt.
2. The migrate helpers can be rather useful. There appear in the D6 migrations and work well. For example if one needs users, the simply use
$this->migrateUsers(FALSE);saving having to remember or search for all the migrations, entities and schemas that need to be installed for the user migrations. In this case, it makes sense to me to have this since every migration will need a store and even though it is only two migrations it seem natural to think in terms of give me a store, without worrying about the details.And thats for the question, I spotted that the currency migration was done twice.
Comment #25
mglamanThat's not how Commerce works though. It always assumes a store is present. We need to make sure all migrated data has relationships to the store (products, orders.)
Comment #26
mglamanTests pass
Comment #27
bojanz commentedWe always need a store, so this migration is absolutely required. Otherwise we can't migrate products or orders, both of which need a store reference.
Comment #28
quietone commentedJust noting that this is blocking #2874667: Add a trait assertEntity functions for tests.
Comment #30
mglamanThanks, quietone!
Made a few changes in commit: