fix old photos without a remote_photo_path or remote_photo_name

closes #8012
This commit is contained in:
Jonne Haß 2019-05-09 16:37:55 +02:00 committed by Benjamin Neff
parent 39b86ed486
commit 2d23a2601e
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 14 additions and 0 deletions

View file

@ -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)

View file

@ -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