Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorBenjamin Neff <benjamin@coding4coffee.ch>2019-07-04 03:30:38 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2019-07-04 03:30:38 +0300
commite63fa7a398d1525ad534c970c21c6372184b359e (patch)
tree0c7900286e4f63adc8df673e1cc9703a390d39d4 /db
parent11caf4f86fdd276b63d7b7bfe64418f36115e623 (diff)
parentb42c9896bc62e17be267e682f280f39877108e53 (diff)
Merge branch 'next-minor' into develop
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190703231700_fix_pending_profile_photos.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20190703231700_fix_pending_profile_photos.rb b/db/migrate/20190703231700_fix_pending_profile_photos.rb
new file mode 100644
index 000000000..51b3a1512
--- /dev/null
+++ b/db/migrate/20190703231700_fix_pending_profile_photos.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class FixPendingProfilePhotos < ActiveRecord::Migration[5.1]
+ def up
+ Photo.where(pending: true).each do |photo|
+ photo.update(pending: false) if Profile.where(image_url: photo.url(:thumb_large)).exists?
+ end
+ end
+end