From b82a773ab2853ff86745571f3777e9d1f6a995ae Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 8 Dec 2022 17:09:17 +1100 Subject: [PATCH] feat: add index for verification_id in pact_version_provider_tag_successful_verifications table --- ...n_provider_tag_successful_verifications.rb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 db/migrations/20221208_add_index_to_pact_version_provider_tag_successful_verifications.rb diff --git a/db/migrations/20221208_add_index_to_pact_version_provider_tag_successful_verifications.rb b/db/migrations/20221208_add_index_to_pact_version_provider_tag_successful_verifications.rb new file mode 100644 index 000000000..6d04bac5c --- /dev/null +++ b/db/migrations/20221208_add_index_to_pact_version_provider_tag_successful_verifications.rb @@ -0,0 +1,21 @@ +require_relative "migration_helper" + +include PactBroker::MigrationHelper + +Sequel.migration do + up do + if !mysql? + alter_table(:pact_version_provider_tag_successful_verifications) do + add_index([:verification_id], name: "pact_version_provider_tag_successful_verifications_verification_id_index") + end + end + end + + down do + if !mysql? + alter_table(:pact_version_provider_tag_successful_verifications) do + drop_index([:verification_id], name: "pact_version_provider_tag_successful_verifications_verification_id_index") + end + end + end +end