Hi. I stumbled upon this change after someone updated media_gallery on prod: http://drupalcode.org/project/media_gallery.git/commitdiff/660d8772b728e...

Is there going to be an upgrade path for this any time soon or should I just do it myself? Yes, I realize this is how the dev branch works :-P


new2.48 KB

Here's an update hook. Should be straightforward. It works against the prod data I've checked so far, but I'd appreciate if anyone could throw me some comments before we run it for real.

Status:Active» Needs review

new2.75 KB

Slight change to the patch. We ran into some cases where the new field's table already existed, probably due to a feature revert. When that happens, the table is dropped if it's empty and the update proceeds as normal. If it has content, the update skips.

Ideally this should probably merge both tables together instead.

Hi, Just saw this issue after posting a patch for this in #1883270: errors after upgrade to media_gallery 2.x - Undefined property: stdClass::$media_gallery_file in media_gallery_node_load() .

It takes a slightly different approach in that it creates the media_gallery_file table first (which doesn't quite match the existing media_gallery_media table) and then migrates the data over.