You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
581 B

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