summaryrefslogtreecommitdiff
path: root/lib/tasks/migrate/migrate_keys.rake
blob: b13d984907bbce71fb46f94995f2b400c443c997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
desc "GITLAB | Migrate SSH Keys"
task migrate_keys: :environment do
  puts "This will add fingerprint to ssh keys in db"
  ask_to_continue

  Key.find_each(batch_size: 20) do |key|
    if key.valid? && key.save
      print '.'
    else
      print 'F'
    end
  end
end