diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 03:09:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 03:09:31 +0000 |
commit | e2ee1eec50aa8df8543d7ecc585ec0ba5ee544ac (patch) | |
tree | 7998650d27ada12ee7d06a21cbb3b5e89f298378 /db | |
parent | 060c842402c00f830a810702600cbe39dfa6cf62 (diff) | |
download | gitlab-ce-e2ee1eec50aa8df8543d7ecc585ec0ba5ee544ac.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20200407094005_drop_vulnerability_severity_index.rb | 18 | ||||
-rw-r--r-- | db/post_migrate/20200407094923_drop_vulnerabilities_severity_index.rb | 18 | ||||
-rw-r--r-- | db/structure.sql | 6 |
3 files changed, 38 insertions, 4 deletions
diff --git a/db/post_migrate/20200407094005_drop_vulnerability_severity_index.rb b/db/post_migrate/20200407094005_drop_vulnerability_severity_index.rb new file mode 100644 index 00000000000..14e6ce32097 --- /dev/null +++ b/db/post_migrate/20200407094005_drop_vulnerability_severity_index.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class DropVulnerabilitySeverityIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + DOWNTIME = false + INDEX_NAME = 'undefined_vulnerabilities' + + def up + remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME + end + + def down + add_concurrent_index(:vulnerability_occurrences, :id, where: 'severity = 0', name: INDEX_NAME) + end +end diff --git a/db/post_migrate/20200407094923_drop_vulnerabilities_severity_index.rb b/db/post_migrate/20200407094923_drop_vulnerabilities_severity_index.rb new file mode 100644 index 00000000000..90ec7dc7ec2 --- /dev/null +++ b/db/post_migrate/20200407094923_drop_vulnerabilities_severity_index.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class DropVulnerabilitiesSeverityIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + DOWNTIME = false + INDEX_NAME = 'undefined_vulnerability' + + def up + remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME + end + + def down + add_concurrent_index(:vulnerabilities, :id, where: 'severity = 0', name: INDEX_NAME) + end +end diff --git a/db/structure.sql b/db/structure.sql index 9c99d11d8a8..6f3c271a0db 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -10391,10 +10391,6 @@ CREATE INDEX tmp_build_stage_position_index ON public.ci_builds USING btree (sta CREATE INDEX tmp_idx_on_user_id_where_bio_is_filled ON public.users USING btree (id) WHERE ((COALESCE(bio, ''::character varying))::text IS DISTINCT FROM ''::text); -CREATE INDEX undefined_vulnerabilities ON public.vulnerability_occurrences USING btree (id) WHERE (severity = 0); - -CREATE INDEX undefined_vulnerability ON public.vulnerabilities USING btree (id) WHERE (severity = 0); - CREATE UNIQUE INDEX users_security_dashboard_projects_unique_index ON public.users_security_dashboard_projects USING btree (project_id, user_id); CREATE UNIQUE INDEX vulnerability_feedback_unique_idx ON public.vulnerability_feedback USING btree (project_id, category, feedback_type, project_fingerprint); @@ -13012,5 +13008,7 @@ COPY "schema_migrations" (version) FROM STDIN; 20200403184110 20200403185127 20200403185422 +20200407094005 +20200407094923 \. |