Skip to content

DataType Update during packageMigration completed then overwritten by uSync import at startup #640

Description

@mistyn8

umb 13.1.1, uSync 13.1.1

I've written a package migration that as part of it's role updates a dataype configuration (blocklist)

However, although this works as expected, adding uSync into the mix causes the update to be reverted as importAtStartup : Settings is in use.

Is it that the notification service isn't present to let uSync know that a dataType has changed?
If so can we manually notify uSync? I do seem to remember there was a savewithevents in days gone past is that something that's missing?

Any pointers so that my migration supports uSync greatfully recieved

simplified code

public class PackageMigration1 : PackageMigrationBase
{
   public IglooPackageMigration1(IPackagingService packagingService, .... , IDataTypeService dataTypeService)
   {
       _dataTypeService = dataTypeService;
   }
   
   protected override void Migrate()
   {
      var contentBlockList = _dataTypeService.GetDataType(new Guid("e52e988a-65e8-45b0-87d7-dfa013357177"));
      // update our datatype and save it
      _dataTypeService.Save(contentBlockList);
      // not generating uSync config file....

   }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions