2016-06-16 23:09:34 +05:30
|
|
|
# rubocop:disable all
|
2015-09-11 14:41:01 +05:30
|
|
|
class RemoveAbandonedGroupMembersRecords < ActiveRecord::Migration
|
|
|
|
def up
|
|
|
|
execute("DELETE FROM members WHERE type = 'GroupMember' AND source_id NOT IN(\
|
|
|
|
SELECT id FROM namespaces WHERE type='Group')")
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
end
|
|
|
|
end
|