about summary refs log tree commit diff
path: root/db/post_migrate/20181116184611_copy_account_stats_cleanup.rb
blob: 9267e9b2c6e3d4faef6c3d0e69fe5cd9b6c29e8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class CopyAccountStatsCleanup < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  def change
    safety_assured do
      remove_column :accounts, :statuses_count, :integer, default: 0, null: false
      remove_column :accounts, :following_count, :integer, default: 0, null: false
      remove_column :accounts, :followers_count, :integer, default: 0, null: false
    end
  end
end