1. 10 Sep, 2017 1 commit
    • Stan Hu's avatar
      Add missing cascading deletes on foreign keys for group_id · b6e6d0b3
      Stan Hu authored
      It was possible to grant access to a group to do things to protected
      branches or tags, but if the group were deleted, the deletion
      might fail due to a message such as the following:
      
      ```
      ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR:  update or delete on table "namespaces" violates foreign key constraint "fk_rails_7111b68cdb" on table "protected_branch_push_access_levels"
      DETAIL:  Key (id)=(1827859) is still referenced from table "protected_branch_push_access_levels".
      : DELETE FROM "namespaces" WHERE "namespaces"."type" IN ('Group') AND "namespaces"."id" = 1827859
      ```
      
      This MR fixes this by adding missing cascading deletions to the
      group_id foreign keys in the following tables:
      
      * protected_branch_merge_access_levels
      * protected_branch_push_access_levels
      * protected_tag_create_access_levels
      
      Closes #3343, #3344, gitlab-org/gitlab-ce#37311
      b6e6d0b3
  2. 08 Sep, 2017 15 commits
  3. 07 Sep, 2017 24 commits