diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-28 18:09:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-28 18:09:45 +0300 |
commit | d62fd6e04c272d48dccde4033529ca97c27502f6 (patch) | |
tree | e3bbea524f4bccb92048fd8a52a42b757618b57b /db | |
parent | aaff41e10e8c03e545af9ba157e79f67686972a0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20230727203840_drop_unique_idx_on_vuln_signatures.rb | 15 | ||||
-rw-r--r-- | db/post_migrate/20230726201351_remove_issues_issue_type_column.rb | 13 | ||||
-rw-r--r-- | db/schema_migrations/20230726201351 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20230727203840 | 1 | ||||
-rw-r--r-- | db/structure.sql | 3 |
5 files changed, 30 insertions, 3 deletions
diff --git a/db/migrate/20230727203840_drop_unique_idx_on_vuln_signatures.rb b/db/migrate/20230727203840_drop_unique_idx_on_vuln_signatures.rb new file mode 100644 index 00000000000..df5957cb24a --- /dev/null +++ b/db/migrate/20230727203840_drop_unique_idx_on_vuln_signatures.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class DropUniqueIdxOnVulnSignatures < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + INDEX_NAME = 'idx_vuln_signatures_on_occurrences_id_and_signature_sha' + + def up + remove_concurrent_index_by_name :vulnerability_finding_signatures, INDEX_NAME + end + + def down + add_concurrent_index :vulnerability_finding_signatures, %i[finding_id signature_sha], unique: true, name: INDEX_NAME + end +end diff --git a/db/post_migrate/20230726201351_remove_issues_issue_type_column.rb b/db/post_migrate/20230726201351_remove_issues_issue_type_column.rb new file mode 100644 index 00000000000..4f066adbc97 --- /dev/null +++ b/db/post_migrate/20230726201351_remove_issues_issue_type_column.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class RemoveIssuesIssueTypeColumn < Gitlab::Database::Migration[2.1] + enable_lock_retries! + + def up + remove_column :issues, :issue_type + end + + def down + add_column :issues, :issue_type, :smallint, default: 0, null: false + end +end diff --git a/db/schema_migrations/20230726201351 b/db/schema_migrations/20230726201351 new file mode 100644 index 00000000000..5c853a999ea --- /dev/null +++ b/db/schema_migrations/20230726201351 @@ -0,0 +1 @@ +03a51d3154a9e9a0b60375c75fe9289d59939187c0443f59ed22da95d446c134
\ No newline at end of file diff --git a/db/schema_migrations/20230727203840 b/db/schema_migrations/20230727203840 new file mode 100644 index 00000000000..cf392959479 --- /dev/null +++ b/db/schema_migrations/20230727203840 @@ -0,0 +1 @@ +259dbdf6d142a0af4c1761eef22e52965ebca63dc801c4b8ed9d885323f24eaa
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 899b2922cad..93e3ad40756 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -17541,7 +17541,6 @@ CREATE TABLE issues ( health_status smallint, external_key character varying(255), sprint_id bigint, - issue_type smallint DEFAULT 0 NOT NULL, blocking_issues_count integer DEFAULT 0 NOT NULL, upvotes_count integer DEFAULT 0 NOT NULL, work_item_type_id bigint, @@ -30184,8 +30183,6 @@ CREATE UNIQUE INDEX idx_uniq_analytics_dashboards_pointers_on_project_id ON anal CREATE INDEX idx_user_details_on_provisioned_by_group_id_user_id ON user_details USING btree (provisioned_by_group_id, user_id); -CREATE UNIQUE INDEX idx_vuln_signatures_on_occurrences_id_and_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, signature_sha); - CREATE UNIQUE INDEX idx_vuln_signatures_uniqueness_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, algorithm_type, signature_sha); CREATE INDEX idx_vulnerabilities_on_project_id_and_id_active_cis_dft_branch ON vulnerabilities USING btree (project_id, id) WHERE ((report_type = 7) AND (state = ANY (ARRAY[1, 4])) AND (present_on_default_branch IS TRUE)); |