Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6a48fe85
Commit
6a48fe85
authored
Sep 07, 2020
by
Kerri Miller
Committed by
Tiger Watson
Sep 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop `code_owner` column from ApprovalMergeRequestRule
parent
8f2f7442
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
5 deletions
+42
-5
changelogs/unreleased/230835-drop-code_owner-column-from-approvalmergerequestrule.yml
...-drop-code_owner-column-from-approvalmergerequestrule.yml
+5
-0
db/post_migrate/20200901212304_drop_code_owner_column_from_approval_merge_request_rule.rb
...rop_code_owner_column_from_approval_merge_request_rule.rb
+36
-0
db/schema_migrations/20200901212304
db/schema_migrations/20200901212304
+1
-0
db/structure.sql
db/structure.sql
+0
-5
No files found.
changelogs/unreleased/230835-drop-code_owner-column-from-approvalmergerequestrule.yml
0 → 100644
View file @
6a48fe85
---
title
:
Drop code_owner column from approval_merge_request_rules
merge_request
:
40322
author
:
type
:
other
db/post_migrate/20200901212304_drop_code_owner_column_from_approval_merge_request_rule.rb
0 → 100644
View file @
6a48fe85
# frozen_string_literal: true
class
DropCodeOwnerColumnFromApprovalMergeRequestRule
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
with_lock_retries
do
remove_column
:approval_merge_request_rules
,
:code_owner
end
end
def
down
unless
column_exists?
(
:approval_merge_request_rules
,
:code_owner
)
with_lock_retries
do
add_column
:approval_merge_request_rules
,
:code_owner
,
:boolean
,
default:
false
,
null:
false
end
end
add_concurrent_index
(
:approval_merge_request_rules
,
[
:merge_request_id
,
:code_owner
,
:name
],
unique:
true
,
where:
"code_owner = true AND section IS NULL"
,
name:
"approval_rule_name_index_for_code_owners"
)
add_concurrent_index
(
:approval_merge_request_rules
,
[
:merge_request_id
,
:code_owner
],
name:
"index_approval_merge_request_rules_1"
)
end
end
db/schema_migrations/20200901212304
0 → 100644
View file @
6a48fe85
6fb93002ffd5c1d1bfff5bea8a99cbbfc7cefefbc450a9d067ee0cfab8d11e9e
\ No newline at end of file
db/structure.sql
View file @
6a48fe85
...
...
@@ -9304,7 +9304,6 @@ CREATE TABLE public.approval_merge_request_rules (
updated_at
timestamp
with
time
zone
NOT
NULL
,
merge_request_id
integer
NOT
NULL
,
approvals_required
smallint
DEFAULT
0
NOT
NULL
,
code_owner
boolean
DEFAULT
false
NOT
NULL
,
name
character
varying
NOT
NULL
,
rule_type
smallint
DEFAULT
1
NOT
NULL
,
report_type
smallint
,
...
...
@@ -19049,8 +19048,6 @@ CREATE UNIQUE INDEX any_approver_project_rule_type_unique_index ON public.approv
CREATE
INDEX
approval_mr_rule_index_merge_request_id
ON
public
.
approval_merge_request_rules
USING
btree
(
merge_request_id
);
CREATE
UNIQUE
INDEX
approval_rule_name_index_for_code_owners
ON
public
.
approval_merge_request_rules
USING
btree
(
merge_request_id
,
code_owner
,
name
)
WHERE
((
code_owner
=
true
)
AND
(
section
IS
NULL
));
CREATE
UNIQUE
INDEX
backup_labels_group_id_project_id_title_idx
ON
public
.
backup_labels
USING
btree
(
group_id
,
project_id
,
title
);
CREATE
INDEX
backup_labels_group_id_title_idx
ON
public
.
backup_labels
USING
btree
(
group_id
,
title
)
WHERE
(
project_id
=
NULL
::
integer
);
...
...
@@ -19223,8 +19220,6 @@ CREATE UNIQUE INDEX index_approval_merge_request_rule_sources_1 ON public.approv
CREATE
INDEX
index_approval_merge_request_rule_sources_2
ON
public
.
approval_merge_request_rule_sources
USING
btree
(
approval_project_rule_id
);
CREATE
INDEX
index_approval_merge_request_rules_1
ON
public
.
approval_merge_request_rules
USING
btree
(
merge_request_id
,
code_owner
);
CREATE
UNIQUE
INDEX
index_approval_merge_request_rules_approved_approvers_1
ON
public
.
approval_merge_request_rules_approved_approvers
USING
btree
(
approval_merge_request_rule_id
,
user_id
);
CREATE
INDEX
index_approval_merge_request_rules_approved_approvers_2
ON
public
.
approval_merge_request_rules_approved_approvers
USING
btree
(
user_id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment