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
e23d4ab3
Commit
e23d4ab3
authored
Sep 23, 2020
by
Tiger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused cluster_providers_aws.created_by_user_id column
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43064
parent
1894c713
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
6 deletions
+31
-6
changelogs/unreleased/35223-drop-unused-user-id-column-on-cluster-providers-aws.yml
...3-drop-unused-user-id-column-on-cluster-providers-aws.yml
+5
-0
db/post_migrate/20200922231755_remove_created_by_user_id_from_cluster_providers_aws.rb
...5_remove_created_by_user_id_from_cluster_providers_aws.rb
+25
-0
db/schema_migrations/20200922231755
db/schema_migrations/20200922231755
+1
-0
db/structure.sql
db/structure.sql
+0
-6
No files found.
changelogs/unreleased/35223-drop-unused-user-id-column-on-cluster-providers-aws.yml
0 → 100644
View file @
e23d4ab3
---
title
:
Remove unused cluster_providers_aws.created_by_user_id column
merge_request
:
43064
author
:
type
:
other
db/post_migrate/20200922231755_remove_created_by_user_id_from_cluster_providers_aws.rb
0 → 100644
View file @
e23d4ab3
# frozen_string_literal: true
class
RemoveCreatedByUserIdFromClusterProvidersAws
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
with_lock_retries
do
remove_column
:cluster_providers_aws
,
:created_by_user_id
end
end
def
down
unless
column_exists?
(
:cluster_providers_aws
,
:created_by_user_id
)
add_column
:cluster_providers_aws
,
:created_by_user_id
,
:integer
end
add_concurrent_index
:cluster_providers_aws
,
:created_by_user_id
add_concurrent_foreign_key
:cluster_providers_aws
,
:users
,
column: :created_by_user_id
,
on_delete: :nullify
end
end
db/schema_migrations/20200922231755
0 → 100644
View file @
e23d4ab3
0019105cd2112e138b9926dc000b0c54b41fca6dfb2c4f658900040e0ecb3b70
\ No newline at end of file
db/structure.sql
View file @
e23d4ab3
...
...
@@ -10701,7 +10701,6 @@ ALTER SEQUENCE cluster_projects_id_seq OWNED BY cluster_projects.id;
CREATE
TABLE
cluster_providers_aws
(
id
bigint
NOT
NULL
,
cluster_id
bigint
NOT
NULL
,
created_by_user_id
integer
,
num_nodes
integer
NOT
NULL
,
status
integer
NOT
NULL
,
created_at
timestamp
with
time
zone
NOT
NULL
,
...
...
@@ -19806,8 +19805,6 @@ CREATE UNIQUE INDEX index_cluster_providers_aws_on_cluster_id ON cluster_provide
CREATE
INDEX
index_cluster_providers_aws_on_cluster_id_and_status
ON
cluster_providers_aws
USING
btree
(
cluster_id
,
status
);
CREATE
INDEX
index_cluster_providers_aws_on_created_by_user_id
ON
cluster_providers_aws
USING
btree
(
created_by_user_id
);
CREATE
INDEX
index_cluster_providers_gcp_on_cloud_run
ON
cluster_providers_gcp
USING
btree
(
cloud_run
);
CREATE
UNIQUE
INDEX
index_cluster_providers_gcp_on_cluster_id
ON
cluster_providers_gcp
USING
btree
(
cluster_id
);
...
...
@@ -23614,9 +23611,6 @@ ALTER TABLE ONLY alert_management_alert_user_mentions
ALTER
TABLE
ONLY
snippet_statistics
ADD
CONSTRAINT
fk_rails_ebc283ccf1
FOREIGN
KEY
(
snippet_id
)
REFERENCES
snippets
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ONLY
cluster_providers_aws
ADD
CONSTRAINT
fk_rails_ed1fdfaeb2
FOREIGN
KEY
(
created_by_user_id
)
REFERENCES
users
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ONLY
project_security_settings
ADD
CONSTRAINT
fk_rails_ed4abe1338
FOREIGN
KEY
(
project_id
)
REFERENCES
projects
(
id
)
ON
DELETE
CASCADE
;
...
...
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