diff --git a/Changelog.md b/Changelog.md index 2dbd4123d..90b3bff77 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,9 @@ * Enable paranoid mode for devise [#8003](https://github.com/diaspora/diaspora/pull/8003) * Refactor likes cucumber test [#8002](https://github.com/diaspora/diaspora/pull/8002) +## Bug fixes +* Fix old photos without remote url for export [#8012](https://github.com/diaspora/diaspora/pull/8012) + ## Features * Add a manifest.json file as a first step to make diaspora\* a Progressive Web App [#7998](https://github.com/diaspora/diaspora/pull/7998) * Allow `web+diaspora://` links to link to a profile with only the diaspora ID [#8000](https://github.com/diaspora/diaspora/pull/8000) diff --git a/db/migrate/20190509125709_fix_missing_remote_photo_fields.rb b/db/migrate/20190509125709_fix_missing_remote_photo_fields.rb new file mode 100644 index 000000000..8d6462643 --- /dev/null +++ b/db/migrate/20190509125709_fix_missing_remote_photo_fields.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class FixMissingRemotePhotoFields < ActiveRecord::Migration[5.1] + def up + Photo.where(remote_photo_path: nil).each do |photo| + photo.write_attribute(:unprocessed_image, photo.read_attribute(:processed_image)) + photo.update_remote_path + photo.save! + end + end +end