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