uSyncMigrations icon indicating copy to clipboard operation
uSyncMigrations copied to clipboard

Feature - mapping config.

Open KevinJump opened this issue 3 years ago • 0 comments

I was starting to put in replacement stuff into options - (e.g map property name from to something type config) but it seemed like i was about to make a new context style beast.

Thinking it would be better if this was a config object, that could be defined in code or loaded from json (because if you can't load from json are you even writing code).

e.g

MigrationMap object . (sits inside the config - but controls all aspects of what we do with stuff).

e.g.

  • say we wanted to rename the title property on all content using the "MyContentType" contentType
  • we want to map the "SimpleTextbox" datatype to the "myNewTextbox" data type
"config" : { 
     "properties" : {
           "MyContentType" : { 
                    "title": "pageTitle"
            }
     },
     "dataTypes"  : {
            "SimpleTextBox" :  "myNewTextBox" 
      }
 }

this will probably evolve as we go through the code, I am thinking now do we want to be able to let people force a conversion

e.g i want to convert this property from this content type into a Blocklist, but the same property on another type is nested content. 🤷 - this might be super helpful if we end up with multiple conversion scenarios for things like grids etc..

KevinJump avatar Dec 08 '22 11:12 KevinJump