2017-05-23 08:57:03 -04:00
|
|
|
# rubocop:disable Migration/UpdateColumnInBatches
|
2016-10-18 09:49:19 -04:00
|
|
|
class MakeProjectOwnersMasters < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
2017-06-21 08:35:06 -04:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2016-10-18 09:49:19 -04:00
|
|
|
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
|