debian-mirror-gitlab/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb

19 lines
459 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
# rubocop:disable Migration/UpdateLargeTable
2017-09-10 17:25:29 +05:30
# rubocop:disable Migration/UpdateColumnInBatches
2017-08-17 22:00:37 +05:30
class ResetUsersAuthorizedProjectsPopulated < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
# This ensures we don't lock all users for the duration of the migration.
update_column_in_batches(:users, :authorized_projects_populated, nil)
end
def down
# noop
end
end