diff --git a/db/migrate/20240507194634_drop_index_alert_management_http_integrations_on_project_id.rb b/db/migrate/20240507194634_drop_index_alert_management_http_integrations_on_project_id.rb new file mode 100644 index 0000000000000000000000000000000000000000..ec2fe0ddb5981f6a79bcf325ddd613439f2d5160 --- /dev/null +++ b/db/migrate/20240507194634_drop_index_alert_management_http_integrations_on_project_id.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class DropIndexAlertManagementHttpIntegrationsOnProjectId < Gitlab::Database::Migration[2.2] + milestone '17.0' + + disable_ddl_transaction! + + TABLE_NAME = :alert_management_http_integrations + INDEX_NAME = :index_alert_management_http_integrations_on_project_id + COLUMN_NAMES = [:project_id] + + def up + remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) + end + + def down + add_concurrent_index(TABLE_NAME, COLUMN_NAMES, name: INDEX_NAME) + end +end diff --git a/db/schema_migrations/20240507194634 b/db/schema_migrations/20240507194634 new file mode 100644 index 0000000000000000000000000000000000000000..61472588a719aeba8aa86f08f38cd96eae7eeba5 --- /dev/null +++ b/db/schema_migrations/20240507194634 @@ -0,0 +1 @@ +e59b68e02cc30c3881e9904514b57301dc0bb47ec47a32941165e3f3760e2e61 \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index f64d462f3bd45f9d745eb1c863d489e19d42d351..9cc0962fdf41102c8218bbd4ac97c98ced5dab4c 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -24487,8 +24487,6 @@ CREATE UNIQUE INDEX index_alert_management_alerts_on_project_id_and_iid ON alert CREATE INDEX index_alert_management_alerts_on_prometheus_alert_id ON alert_management_alerts USING btree (prometheus_alert_id) WHERE (prometheus_alert_id IS NOT NULL); -CREATE INDEX index_alert_management_http_integrations_on_project_id ON alert_management_http_integrations USING btree (project_id); - CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id ON alert_management_alert_user_mentions USING btree (alert_management_alert_id) WHERE (note_id IS NULL); CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id_and_note_id ON alert_management_alert_user_mentions USING btree (alert_management_alert_id, note_id);