From 51e154f5e87968d6bb115e053689767ab33e80cd Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 14 Mar 2019 05:28:30 +0100 Subject: Admission-based registrations mode (#10250) Fix #6856 Fix #6951 --- db/migrate/20190307234537_add_approved_to_users.rb | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 db/migrate/20190307234537_add_approved_to_users.rb (limited to 'db/migrate/20190307234537_add_approved_to_users.rb') diff --git a/db/migrate/20190307234537_add_approved_to_users.rb b/db/migrate/20190307234537_add_approved_to_users.rb new file mode 100644 index 000000000..c57a66dbc --- /dev/null +++ b/db/migrate/20190307234537_add_approved_to_users.rb @@ -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 -- cgit