summaryrefslogtreecommitdiff
path: root/db/migrate/20161018124658_make_project_owners_masters.rb
blob: fe11699c196ff0d4010a5d7387f1737a9f672069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# rubocop:disable Migration/UpdateColumnInBatches
class MakeProjectOwnersMasters < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def up
    update_column_in_batches(:members, :access_level, 40) do |table, query|
      query.where(table[:access_level].eq(50).and(table[:source_type].eq('Project')))
    end
  end

  def down
    # do nothing
  end
end