diff options
author | Valery Sizov <valery@gitlab.com> | 2016-10-18 16:49:19 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-10-21 12:57:53 +0300 |
commit | 168197cd5a179c961301225626ac1a175f892782 (patch) | |
tree | 23e5cd1ae78f7c0f436dbed1ae9294cad2ca25f0 /db/migrate/20161018124658_make_project_owners_masters.rb | |
parent | b1df8c4ec3f3213b7387e643bf57ce0fb1e1bcae (diff) |
Fix project member access levels
Diffstat (limited to 'db/migrate/20161018124658_make_project_owners_masters.rb')
-rw-r--r-- | db/migrate/20161018124658_make_project_owners_masters.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20161018124658_make_project_owners_masters.rb b/db/migrate/20161018124658_make_project_owners_masters.rb new file mode 100644 index 00000000000..a576bb7b622 --- /dev/null +++ b/db/migrate/20161018124658_make_project_owners_masters.rb @@ -0,0 +1,15 @@ +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 |