Commit 9d40f378 authored by Steve Abrams's avatar Steve Abrams

Merge branch 'sk/349605-remove-tmp-index' into 'master'

Remove temp index on id in vulnerability_occurrences

See merge request gitlab-org/gitlab!78698
parents a9edc7fe 4fb3577b
# frozen_string_literal: true
class RemoveTempIndexOnIdFromVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
INDEX_NAME = 'tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :vulnerability_occurrences, name: INDEX_NAME
end
def down
add_concurrent_index :vulnerability_occurrences, :id, where: 'report_type IN (7, 99)', name: INDEX_NAME
end
end
92485ceb25d5733efe9a35a5bd64c9f33253bb10f815590518c6fc8d1c9e5f39
\ No newline at end of file
......@@ -29567,8 +29567,6 @@ CREATE INDEX tmp_gitlab_subscriptions_max_seats_used_migration ON gitlab_subscri
CREATE INDEX tmp_gitlab_subscriptions_max_seats_used_migration_2 ON gitlab_subscriptions USING btree (id) WHERE ((start_date < '2021-08-02'::date) AND (max_seats_used <> 0) AND (max_seats_used > seats_in_use) AND (max_seats_used > seats));
CREATE INDEX tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99 ON vulnerability_occurrences USING btree (id) WHERE (report_type = ANY (ARRAY[7, 99]));
CREATE INDEX tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at ON ci_job_artifacts USING btree (id) WHERE ((file_type = 3) AND (expire_at = ANY (ARRAY['2021-04-22 00:00:00+00'::timestamp with time zone, '2021-05-22 00:00:00+00'::timestamp with time zone, '2021-06-22 00:00:00+00'::timestamp with time zone, '2022-01-22 00:00:00+00'::timestamp with time zone, '2022-02-22 00:00:00+00'::timestamp with time zone, '2022-03-22 00:00:00+00'::timestamp with time zone, '2022-04-22 00:00:00+00'::timestamp with time zone])));
CREATE INDEX tmp_index_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state);
......@@ -7,7 +7,7 @@ RSpec.describe Vulnerabilities::Finding do
it { is_expected.to define_enum_for(:severity) }
it { is_expected.to define_enum_for(:detection_method) }
it { is_expected.to have_locked_schema('9365b96bf5968b685f28c7c41659aa384e7d0c019cfeb244f22bb6d4bb49cdd7').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') }
it { is_expected.to have_locked_schema('52e60347ff810afd7fe858013c9e8476bd04d01b8bd1ab18e6e408cec4ad7fcd').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') }
where(vulnerability_finding_signatures: [true, false])
with_them do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment