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
bcf63697
Commit
bcf63697
authored
Jun 18, 2020
by
Etienne Baqué
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added deploy_key_id fk to push access levels
parent
12914d79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
db/migrate/20200617205000_add_deploy_key_id_to_push_access_levels.rb
...20200617205000_add_deploy_key_id_to_push_access_levels.rb
+20
-0
db/structure.sql
db/structure.sql
+8
-1
No files found.
db/migrate/20200617205000_add_deploy_key_id_to_push_access_levels.rb
0 → 100644
View file @
bcf63697
# frozen_string_literal: true
class
AddDeployKeyIdToPushAccessLevels
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_column
:protected_branch_push_access_levels
,
:deploy_key_id
,
:integer
add_concurrent_foreign_key
:protected_branch_push_access_levels
,
:keys
,
column: :deploy_key_id
,
on_delete: :cascade
add_concurrent_index
:protected_branch_push_access_levels
,
:deploy_key_id
,
name:
'index_deploy_key_id_on_protected_branch_push_access_levels'
end
def
down
remove_column
:protected_branch_push_access_levels
,
:deploy_key_id
end
end
db/structure.sql
View file @
bcf63697
...
...
@@ -14501,7 +14501,8 @@ CREATE TABLE public.protected_branch_push_access_levels (
created_at
timestamp
without
time
zone
NOT
NULL
,
updated_at
timestamp
without
time
zone
NOT
NULL
,
user_id
integer
,
group_id
integer
group_id
integer
,
deploy_key_id
integer
);
CREATE
SEQUENCE
public
.
protected_branch_push_access_levels_id_seq
...
...
@@ -19025,6 +19026,8 @@ CREATE INDEX index_dependency_proxy_blobs_on_group_id_and_file_name ON public.de
CREATE
INDEX
index_dependency_proxy_group_settings_on_group_id
ON
public
.
dependency_proxy_group_settings
USING
btree
(
group_id
);
CREATE
INDEX
index_deploy_key_id_on_protected_branch_push_access_levels
ON
public
.
protected_branch_push_access_levels
USING
btree
(
deploy_key_id
);
CREATE
INDEX
index_deploy_keys_projects_on_deploy_key_id
ON
public
.
deploy_keys_projects
USING
btree
(
deploy_key_id
);
CREATE
INDEX
index_deploy_keys_projects_on_project_id
ON
public
.
deploy_keys_projects
USING
btree
(
project_id
);
...
...
@@ -20908,6 +20911,9 @@ ALTER TABLE ONLY public.vulnerabilities
ALTER
TABLE
ONLY
public
.
vulnerabilities
ADD
CONSTRAINT
fk_131d289c65
FOREIGN
KEY
(
milestone_id
)
REFERENCES
public
.
milestones
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ONLY
public
.
protected_branch_push_access_levels
ADD
CONSTRAINT
fk_15d2a7a4ae
FOREIGN
KEY
(
deploy_key_id
)
REFERENCES
public
.
keys
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
public
.
internal_ids
ADD
CONSTRAINT
fk_162941d509
FOREIGN
KEY
(
namespace_id
)
REFERENCES
public
.
namespaces
(
id
)
ON
DELETE
CASCADE
;
...
...
@@ -23686,6 +23692,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200617001848
20200617002030
20200617150041
20200617205000
20200618105638
20200618134223
20200618134723
...
...
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