1
0

20191001213028_add_lock_version_to_account_stats.rb 431 B

1234567891011121314151617
  1. # frozen_string_literal: true
  2. require Rails.root.join('lib', 'mastodon', 'migration_helpers')
  3. class AddLockVersionToAccountStats < ActiveRecord::Migration[5.2]
  4. include Mastodon::MigrationHelpers
  5. disable_ddl_transaction!
  6. def up
  7. safety_assured { add_column_with_default :account_stats, :lock_version, :integer, allow_null: false, default: 0 }
  8. end
  9. def down
  10. remove_column :account_stats, :lock_version
  11. end
  12. end