gitlab-org--gitlab-foss/db
Timothy Andrew f1e46d1e63 Add a series of migrations changing the model-level design of protected branch access levels.
1. Remove the `developers_can_push` and `developers_can_merge` boolean
   columns.

2. Add two new tables, `protected_branches_push_access`, and
   `protected_branches_merge_access`. Each row of these 'access' tables is
   linked to a protected branch, and uses a `access_level` column to
   figure out settings for the protected branch.

3. The `access_level` column is intended to be used with rails' `enum`,
   with `:masters` at index 0 and `:developers` at index 1.

4. Doing it this way has a few advantages:

   - Cleaner path to planned EE features where a protected branch is
     accessible only by certain users or groups.

   - Rails' `enum` doesn't allow a declaration like this due to the
     duplicates. This approach doesn't have this problem.

       enum can_be_pushed_by: [:masters, :developers]
       enum can_be_merged_by: [:masters, :developers]
2016-07-29 15:20:39 +05:30
..
fixtures Remove project which can't be pulled while seeding 2016-07-28 20:00:04 +02:00
migrate Add a series of migrations changing the model-level design of protected branch access levels. 2016-07-29 15:20:39 +05:30
schema.rb Add a series of migrations changing the model-level design of protected branch access levels. 2016-07-29 15:20:39 +05:30
seeds.rb