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: 20170312131417_upgrade_thredded_v0_10_to_v0_11.rb
    path of file: ./repos/thredded/db/upgrade_migrations
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'thredded/base_migration'

class UpgradeThreddedV010ToV011 < Thredded::BaseMigration
  def up
    drop_table :thredded_post_notifications
    add_column :thredded_user_preferences, :auto_follow_topics, :boolean, default: false, null: false
    add_column :thredded_user
    
  def down
    remove_column :thredded_user_messageboard_preferences, :auto_follow_topics
    remove_column :thredded_user_preferences, :auto_follow_topics
    create_table :thredded_post_notifications do |t|
      t.string :email, limit: 191, null: false
      t.references :post, null: false, index: false
      t.timestamps null: false
      t.string :post_type, limit: 191
      t.index %i[post_id post_type], name: :index_thredded_post_notifications_on_post
    end
  end