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 | |
parent | b1df8c4ec3f3213b7387e643bf57ce0fb1e1bcae (diff) | |
download | gitlab-ce-168197cd5a179c961301225626ac1a175f892782.tar.gz |
Fix project member access levelsfix_project_member_access_levels
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20161018124658_make_project_owners_masters.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 16 insertions, 1 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 diff --git a/db/schema.rb b/db/schema.rb index a3c7fc2fd57..f5c01511195 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -843,7 +843,7 @@ ActiveRecord::Schema.define(version: 20161019213545) do t.integer "builds_access_level" t.datetime "created_at" t.datetime "updated_at" - t.integer "repository_access_level", default: 20, null: false + t.integer "repository_access_level", default: 20, null: false end add_index "project_features", ["project_id"], name: "index_project_features_on_project_id", using: :btree |