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: 20170304163946_fix_encodings.rb
    path of file: ./repos/onebody/db/migrate
    
    the code of the file until where you have to start completion: class FixEncodings < ActiveRecord::Migration[4.2]
  TABLES = %w(
    admins
    admins_reports
    albums
    attachments
    attendance_records
    checkin_folders
    checkin_labels
    checkin_times
    comments
    custom_field_values
    custom_fields
    custom_reports
    document_folder_groups
    document_folders
    documents
    families
    friendship_requests
    friendships
    generated_files
    group_times
  
    
  def up
    return if ActiveRecord::Base.connection.adapter_name != 'Mysql2'
    config = ActiveRecord::Base.connection.instance_variable_get(:@config)
    if config[:encoding] != 'utf8mb4'
      puts
      puts <<-ERROR.strip_heredoc
        Please fix your config/database.yml file. It should look like this:

            production:
              adapter: mysql2
              database: onebody
              host: localhost
              username: onebody
              password: onebody
              encoding: utf8mb4
              collation: utf8mb4_unicode_ci

      ERROR
      raise 'bad config'
    end