Try our conversational search powered by Generative AI!

MigrationStep in Commerce

Vote:
 
Hi, I tried to rename a property with MigrationStep on a Variant, but it has no effect:
public class MyMigrationStep : MigrationStep
{
    public override void AddChanges()
    {
        ContentType(nameof(MyVariationContent))
            .Property("NewName")
            .UsedToBeNamed("OldName");
    }
}
After running the code, the new property is empty and the old one is there as leftover with its original value. Then I have to do the migration and cleanup manually. Is it supposed to work with Commerce or only for CMS? (for CMS it is working fine) If Commerce is not supported, is there any way to achieve this? Thank you in advance!
#198839
Edited, Nov 07, 2018 14:51
Vote:
 

It is, unfortunately, not supported for Catalog content. Your best bet is to create a property with new name and then migrate the data over the new one.

#198857
Nov 07, 2018 15:44
Vote:
 
Ok, thank you very much for the info!
#198914
Nov 08, 2018 15:26
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.