Fix 20160906225138_fix_photos_share_visibilities.rb for postgres

Turns out that postgres can't handle "0" as boolean, but mysql can
handle "false".

closes #7115#pullrequestreview-699342
This commit is contained in:
Benjamin Neff 2016-09-20 10:13:34 +02:00 committed by Dennis Schubert
parent ffb442266f
commit b4455aaf25
No known key found for this signature in database
GPG key ID: 5A0304BEA7966D7E

View file

@ -21,7 +21,7 @@ class FixPhotosShareVisibilities < ActiveRecord::Migration
"INNER JOIN posts ON posts.guid = photos.status_message_guid AND posts.type = 'StatusMessage' " \
"LEFT OUTER JOIN share_visibilities ON share_visibilities.shareable_id = photos.id " \
"INNER JOIN share_visibilities AS post_visibility ON post_visibility.shareable_id = posts.id " \
"WHERE photos.public = 0 AND share_visibilities.shareable_id IS NULL " \
"WHERE photos.public = false AND share_visibilities.shareable_id IS NULL " \
"AND post_visibility.shareable_type = 'Post'"
end