Remove any stray post_visibilities
This commit is contained in:
parent
6a51c09a16
commit
c9d5a15bf8
1 changed files with 2 additions and 0 deletions
|
|
@ -27,6 +27,8 @@ SQL
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.delete_duplicate_pvs
|
def self.delete_duplicate_pvs
|
||||||
|
execute('DELETE FROM post_visibilities WHERE post_visibilities.contact_id = 0')
|
||||||
|
|
||||||
duplicate_rows = execute <<SQL
|
duplicate_rows = execute <<SQL
|
||||||
SELECT COUNT(pv.contact_id), pv.contact_id, pv.post_id from post_visibilities AS pv
|
SELECT COUNT(pv.contact_id), pv.contact_id, pv.post_id from post_visibilities AS pv
|
||||||
GROUP BY pv.contact_id, pv.post_id
|
GROUP BY pv.contact_id, pv.post_id
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue