2017-09-10 17:25:29 +05:30
|
|
|
# rubocop:disable Migration/UpdateColumnInBatches
|
2016-11-03 12:29:30 +05:30
|
|
|
class MakeProjectOwnersMasters < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
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
|