about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-03-14 17:14:05 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-14 17:17:20 +0100
commit07eb31eeacc4e0364b839233a41fa65eb3c650ce (patch)
tree843cda5a4d9bc730aba9a13d0634fef5e2212515 /db/migrate
parentfa75324059c7a146354470691888dc0e1de0342f (diff)
parent874bd3ac0c56e2d2901785e170b27f5cde32b33b (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/views/admin/settings/edit.html.haml:
  Conflict due to how the theming settings change.
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20190307234537_add_approved_to_users.rb23
1 files changed, 23 insertions, 0 deletions
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