Add ability to disable login and mark accounts as memorial (#5615)
Fix #5597
This commit is contained in:
15
db/migrate/20171107143332_add_memorial_to_accounts.rb
Normal file
15
db/migrate/20171107143332_add_memorial_to_accounts.rb
Normal file
@ -0,0 +1,15 @@
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class AddMemorialToAccounts < ActiveRecord::Migration[5.1]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
safety_assured { add_column_with_default :accounts, :memorial, :bool, default: false }
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :accounts, :memorial
|
||||
end
|
||||
end
|
15
db/migrate/20171107143624_add_disabled_to_users.rb
Normal file
15
db/migrate/20171107143624_add_disabled_to_users.rb
Normal file
@ -0,0 +1,15 @@
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class AddDisabledToUsers < ActiveRecord::Migration[5.1]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
safety_assured { add_column_with_default :users, :disabled, :bool, default: false }
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :users, :disabled
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user