20171028221157_add_reblogs_to_follows.rb 582 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. require Rails.root.join('lib', 'mastodon', 'migration_helpers')
  3. class AddReblogsToFollows < ActiveRecord::Migration[5.2]
  4. include Mastodon::MigrationHelpers
  5. disable_ddl_transaction!
  6. def up
  7. safety_assured do
  8. add_column_with_default :follows, :show_reblogs, :boolean, default: true, allow_null: false
  9. add_column_with_default :follow_requests, :show_reblogs, :boolean, default: true, allow_null: false
  10. end
  11. end
  12. def down
  13. remove_column :follows, :show_reblogs
  14. remove_column :follow_requests, :show_reblogs
  15. end
  16. end