From 0e1c43ddbb17098ff0ceb14b0e84798bcb76446c Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 15 Dec 2022 08:22:58 +1100 Subject: [PATCH] feat: add index to provider_version_id column in latest_verification_id_for_pact_version_and_provider_version --- ...atest_verifi_id_for_pact_ver_and_prov_ver.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 db/migrations/20221215_add_prov_ver_id_ndx_to_latest_verifi_id_for_pact_ver_and_prov_ver.rb diff --git a/db/migrations/20221215_add_prov_ver_id_ndx_to_latest_verifi_id_for_pact_ver_and_prov_ver.rb b/db/migrations/20221215_add_prov_ver_id_ndx_to_latest_verifi_id_for_pact_ver_and_prov_ver.rb new file mode 100644 index 000000000..1ea9304cd --- /dev/null +++ b/db/migrations/20221215_add_prov_ver_id_ndx_to_latest_verifi_id_for_pact_ver_and_prov_ver.rb @@ -0,0 +1,17 @@ +Sequel.migration do + up do + if !mysql? + alter_table(:latest_verification_id_for_pact_version_and_provider_version) do + add_index([:provider_version_id], name: "latest_verif_id_for_pact_ver_and_prov_ver_prov_ver_id_ndx") + end + end + end + + down do + if !mysql? + alter_table(:latest_verification_id_for_pact_version_and_provider_version) do + drop_index([:provider_version_id], name: "latest_verif_id_for_pact_ver_and_prov_ver_prov_ver_id_ndx") + end + end + end +end