debian-mirror-gitlab/db/migrate/20161018124658_make_project_owners_masters.rb
2019-02-13 22:33:31 +05:30

18 lines
430 B
Ruby

# rubocop:disable Migration/UpdateColumnInBatches
class MakeProjectOwnersMasters < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
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