diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20190722014444_migrate_hidden_to_hide_profile.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20190722014444_migrate_hidden_to_hide_profile.rb b/db/migrate/20190722014444_migrate_hidden_to_hide_profile.rb new file mode 100644 index 000000000..c4d305e6b --- /dev/null +++ b/db/migrate/20190722014444_migrate_hidden_to_hide_profile.rb @@ -0,0 +1,10 @@ +class MigrateHiddenToHideProfile < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + def up + Account.local.find_each do |account| + next unless account&.user + account.user.settings.hide_public_profile = account.hidden || false + account.hidden = false + end + end +end |