parent
6e3936aa6f
commit
51e154f5e8
92 changed files with 282 additions and 249 deletions
23
db/migrate/20190307234537_add_approved_to_users.rb
Normal file
23
db/migrate/20190307234537_add_approved_to_users.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class AddApprovedToUsers < ActiveRecord::Migration[5.2]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
safety_assured do
|
||||
add_column_with_default(
|
||||
:users,
|
||||
:approved,
|
||||
:bool,
|
||||
allow_null: false,
|
||||
default: true
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :users, :approved
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue