Try our conversational search powered by Generative AI!

Add IMigrationStep for existing working site - Commerce 9

Vote:
 

Hi,

I have got existing site in which i want to add new MigrationStep. The reason for this to add new markets, warehouses and shipping method.

I want to add above values through code instead of user adding them through backend commerce site. Is it the correct way to do or i should add those through EPiServer.Commerce.Initialization.InitializationModule?

Let me know what is the correct way.

I have tried adding new migration step with different namespace but commerce admin does not pick up new migration steps.

Cheers

Ali, Murtaza

#171224
Edited, Nov 03, 2016 1:33
Vote:
 

Make sure you decorate the class as well, see: http://geta.no/blogg/no-more-manual-deployment-steps/

#171238
Nov 03, 2016 10:57
Vote:
 

Hi,

IMigrationStep is an "internal" interface and is supposed to be used only by Episerver, which means you can technically use it, but we won't be able to support you if you run into problem, or if there is any breaking change.

Note that IMigrationStep is supposed to run once, while Initialization module is supposed to run once every time the site starts. So depends on your needs - choose the correct one.

Regards,

/Q

#171239
Edited, Nov 03, 2016 11:13
Vote:
 

Hi,

Thanks for the replies, I was looking at wrong place. I was thinking Migration Updates will appear after commerce login but when i logged into CMS it did indeed show the Migrations Update.

Another way to find out whether migration was successfully updates is through View ([dbo].[VW_EPiServer.Commerce.Internal.Migration.MigrationStepInfo]) Available in CMS db.

Cheers

#171258
Nov 03, 2016 23:25
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.