blob: 6013605bb3541c9e636a1ef76000073b939ec315 (
plain)
1
2
3
4
5
6
|
class RemoveAbandonedGroupMembersRecords < ActiveRecord::Migration
def change
execute("DELETE FROM members WHERE type = 'GroupMember' AND source_id NOT IN(\
SELECT id FROM namespaces WHERE type='Group')")
end
end
|