Dealing with "Legacy attachment" and "Legacy media file" during migration projects

While using Kentico Migration Tool for migration projects, it creates "Legacy attachment" and "Legacy media file" types automatically to migrate media content there. That's fine for a kind of transition state, however AFTER migration, how do you live with these types going forward?

  • Leave 'as is' and all new media content is created using these 'Legacy' types?
  • Introduce new content type for media and support both in code?
  • Somehow rename Legacy types to not being called 'Legacy' anymore?)

Or is there an easy way of renaming these things during migration? So that when the editor logs into their freshly migrated XbyK site and not creating a 'Legacy'?

Tags:
Migration / upgrade
0

Answers

We've left the Legacy.MediaFile and Legacy.Attachment content types as-is, support both types in code, but in practice only use Legacy.MediaFile for new content.

Because the files' GUIDs are preserved during the site migration, we also add code to get new file URLs if legacy-style attachment/media URLs are requested:

  • getmedia/{guidstring:guid}/{filename}

  • getattachment/{guidstring:guid}/{filename}

This is helpful if there are media/attachment URLs that weren't updated automatically by the migration tool, or if there are 3rd party sites still pointing to the old URLs.

0

I'll start by saying I HATE THIS! (and I don't hate). This is not forward thinking at all and just screams "hey, we'll have a problem later".

I worked through a site with 4000+ media library items, 600+ attachments and actually migrated them into an "Image", "Document", and "Video" content types. Our next migration used a DAM so we didn't have any media library or attachments to deal with. Our following migrations all dealt with media libraries. It was a challenge for our first migration, but we eventually did get it to work with some bugs. We're still fine tuning the process and looking to put in a PR for the repository.

The short story/fix is you can go into the Migration project and review the following files and modify the names.

\KVA\Migration.Tool.Source\Services\AssetFacade.cs

In this file look for any FormField property that starts with LegacyMedia. Don't modify the property name, leave that. You can however, modify the Column and the FieldCaption properties to fit with what you'd like more. There are other properties you can modify as well but be careful what you modify and where as it is hardcoded for a reason and those GUID fields are used in other places to make references. This is only a temp fix in my opinion, but it works.

0

To response this discussion, you have to login first.