Skip to content
Snippets Groups Projects
Unverified Commit 5dd1deb2 authored by Valery Sizov's avatar Valery Sizov Committed by Dmitriy Zaporozhets
Browse files

Remove abandoned GroupMembers


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	db/schema.rb
parent a6519517
No related branches found
No related tags found
No related merge requests found
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
Loading
Loading
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
 
ActiveRecord::Schema.define(version: 20150417122318) do
ActiveRecord::Schema.define(version: 20150429002313) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment