You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20160307085545_warn_about_duplicate_usernames.rb
    path of file: ./repos/huginn/db/migrate
    
    the code of the file until where you have to start completion: class WarnAboutDuplicateUsernames < ActiveRecord::Migration[4.2]
  def up
    names = User.group('LOWER(username)').having('count(*) > 1').pluck('LOWER(username)')
    if names.length > 0
      puts "-----------------------------------------------------"
      puts "--------------------- WARNiNG -----------------------"
      puts "-------- Found users with duplicate usernames -------"
      puts "-----------------------------------------------------"
      puts "For the users to log in using their username they have to change it to a unique name"
      names.each do |name|
        puts
        puts "'#{name}' is used multiple times:"
        User.where(['LOWER(username) = ?', nam
    
  def up
    names = User.group('LOWER(username)').having('count(*) > 1').pluck('LOWER(username)')
    if names.length > 0
      puts "-----------------------------------------------------"
      puts "--------------------- WARNiNG -----------------------"
      puts "-------- Found users with duplicate usernames -------"
      puts "-----------------------------------------------------"
      puts "For the users to log in using their username they have to change it to a unique name"
      names.each do |name|
        puts
        puts "'#{name}' is used multiple times:"
        User.where(['LOWER(username) = ?', name]).each do |u|
          puts "#{u.id}\t#{u.email}"
        end
      end
      puts
      puts
    end