-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow transformEntries style migrations between different Content Models #113
Comments
@Shy that's pretty much the idea. Even directly porting fields from one entry type to a new entry type. In our current use case, we're looking to change the entry ID/name (and make some adjustments). Being able to port the content simultaneously would be a big time saver. |
Is deriveLinkedEntries what you are looking for, or do you want the same functionality but without the linking part? |
@TimBeyer Given an entry type of I would like to now:
|
Researching further, I'm starting to think the solution lies in using the Content Management API rather than trying to fold this into my migration scripts... |
While it's possible to do this all using the content management API, I would also appreciate a version of this directly in the migration CLI. We often have the same use cases that @benjarwar mentions. We deprecate one content type in favour of another one or splitting up a content type into several ones. Another use case would be renaming of content types. It's a real pain that it's impossible to rename contentTypes (sys.id not display name). We have a lot of content types and sometimes the name doesn't match the use cases or our naming conventions anymore. With migrations we could at least create a new content type with the same fields and migrate all entries over. Thanks! |
Hey Folks, I would like to understand more the Feature so I can help. Can you share a snippet of code on how you imagine the functionality or maybe a drawing/graph? Best, |
Hey, thanks for the response. I would image something like this:
Maybe this could even be merged into the existing |
Thank you, I will add this to our internal ticketing system. Best, |
Hello, We have multiple changes waiting for this extension since we want to clean up our Contentful spaces and seperate content types out of another content type and migrate all references and trying to avoid doing it manually. Best regards, |
Hey @GordonApplepie, |
UPDATE:
@Khaledgarbaya since we are not that familiar with debugging node apps would it be possible for you to tell us how to be able to debug the contentful-migration library? we are able to execute the tool, i am also able to get into debug mode via visual studio code but i am not able to fill in the args (like --space-id) to actually make a call to the different scripts. example vs code launch settings
ends up in if i open it directly from the terminal, the debugger of vs code does not get attached |
Hi @GordonApplepie, I would recommend using a tool like ndb. |
Hi @Khaledgarbaya, I've worked with @GordonApplepie on a PR for this feature. We will probably do some more work on it next week, but it would be nice to get some feedback from your side already. Thanks! |
hey @aKzenT 😱 I just saw you huge PR, Thank you a lot for that. |
@Khaledgarbaya did you have time to take a look already? |
…t type (#143) ## Summary This PR extends the available migrations with a new "transformEntriesToType"-transform that allows migrations from one content type to another as discussed in #113 ## Description A new action was added to support the transformation. Various enhancements to the OfflineAPI as well as the Fetcher were needed to implement the features. ## Motivation and Context See #113 ## Todos - [x] Basic functionality working - [x] Option to remove the source item after transformation - [x] Option to publish/not publish or keep the state of the original entry - [x] Option to change all references to the original entry so that they point to the new entry instead - [x] Additional tests
@benjarwar does #143 already solve your use case, or should we keep this issue open? |
Context
@benjarwar can jump in here with more context, but we're looking for the ability to allow transformEntries from the migration CLI but between different content models.
For example, Content Model A has Author. We create a new Content Model B. Content Model B needs Author but split into first name, last name.
The text was updated successfully, but these errors were encountered: