debian-mirror-gitlab/db/migrate/20161018124658_make_project_owners_masters.rb
2016-11-03 12:29:30 +05:30

15 lines
347 B
Ruby

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