Commit 4aa3ce75 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Add check for orphaned UsersGroups

parent 17a9ecf8
No related merge requests found
......@@ -17,6 +17,7 @@ namespace :gitlab do
check_database_config_exists
check_database_is_not_sqlite
check_migrations_are_up
check_orphaned_users_groups
check_gitlab_config_exists
check_gitlab_config_not_outdated
check_log_writable
......@@ -181,6 +182,15 @@ namespace :gitlab do
end
end
def check_orphaned_users_groups
print "Database contains orphaned UsersGroups? ... "
if UsersGroup.where("user_id not in (select id from users)").count > 0
puts "yes".red
else
puts "no".green
end
end
def check_satellites_exist
print "Projects have satellites? ... "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment