Commit a96063b8 authored by Kamil Trzciński's avatar Kamil Trzciński

Remove indexes for FK (EE)

parent b4bcbbdd
......@@ -21,6 +21,19 @@ class AddMissingIndexesForForeignKeysEE < ActiveRecord::Migration
end
def down
# no-op
# MySQL requires index for FK,
# thus removal of indexes does fail
return if Gitlab::Database.mysql?
remove_concurrent_index(:application_settings, :file_template_project_id)
remove_concurrent_index(:application_settings, :custom_project_templates_group_id)
remove_concurrent_index(:board_assignees, :assignee_id)
remove_concurrent_index(:board_labels, :label_id)
remove_concurrent_index(:ci_pipeline_chat_data, :chat_name_id)
remove_concurrent_index(:geo_node_namespace_links, :namespace_id)
remove_concurrent_index(:namespaces, :file_template_project_id)
remove_concurrent_index(:protected_branch_merge_access_levels, :group_id)
remove_concurrent_index(:protected_branch_push_access_levels, :group_id)
remove_concurrent_index(:software_license_policies, :software_license_id)
end
end
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