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: 051_add_status_to_user.rb
    path of file: ./repos/openstreetmap-website/db/migrate
    
    the code of the file until where you have to start completion: class AddStatusToUser < ActiveRecord::Migration[4.2]
  class User < ApplicationRecord
  end

  def self.up
    create_enum :user_status_enum, %w[pending active confirmed suspended deleted]

    add_column :users, :status, :user_status_enum, :null => false, :default => "pending"

    User.where(:visible => false).update_all
    
  def self.down
    add_column :users, :visible, :boolean, :default => true, :null => false
    add_column :users, :active, :integer, :default => 0, :null => false

    User.where(:status => "active").update_all(:visible => true, :active => 1)
    User.where(:status => "pending").update_all(:visible => true, :active => 0)
    User.where(:status => "deleted").update_all(:visible => false, :active => 1)

    remove_column :users, :status

    drop_enumeration :user_status_enum
  end