summaryrefslogtreecommitdiff
path: root/db/post_migrate/20190725080128_set_not_null_on_users_private_profile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20190725080128_set_not_null_on_users_private_profile.rb')
-rw-r--r--db/post_migrate/20190725080128_set_not_null_on_users_private_profile.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/db/post_migrate/20190725080128_set_not_null_on_users_private_profile.rb b/db/post_migrate/20190725080128_set_not_null_on_users_private_profile.rb
deleted file mode 100644
index db42e949d3f..00000000000
--- a/db/post_migrate/20190725080128_set_not_null_on_users_private_profile.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class SetNotNullOnUsersPrivateProfile < ActiveRecord::Migration[5.1]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- Gitlab::BackgroundMigration.steal('MigrateNullPrivateProfileToFalse')
-
- # rubocop:disable Migration/UpdateLargeTable
- # rubocop:disable Migration/UpdateColumnInBatches
- # Data has been migrated previously, count should be close to 0
- update_column_in_batches(:users, :private_profile, false) do |table, query|
- query.where(table[:private_profile].eq(nil))
- end
-
- change_column_null :users, :private_profile, false
- end
-
- def down
- change_column_null :users, :private_profile, true
- end
-end