debian-mirror-gitlab/db/migrate/20150429002313_remove_abandoned_group_members_records.rb
2016-06-16 23:09:34 +05:30

11 lines
265 B
Ruby

# rubocop:disable all
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