Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20170131214021_reset_users_authorized_projects_populated.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 82f8147547ebb465e4568011f9f53e4c2a81084e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# rubocop:disable Migration/UpdateColumnInBatches
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