diff --git a/db/migrations/20230131_add_cons_ver_id_ndx_to_latest_pp_id_for_cons_ver.rb b/db/migrations/20230131_add_cons_ver_id_ndx_to_latest_pp_id_for_cons_ver.rb new file mode 100644 index 000000000..1c3ab5688 --- /dev/null +++ b/db/migrations/20230131_add_cons_ver_id_ndx_to_latest_pp_id_for_cons_ver.rb @@ -0,0 +1,17 @@ +require_relative "migration_helper" + +include PactBroker::MigrationHelper + +Sequel.migration do + up do + alter_table(:latest_pact_publication_ids_for_consumer_versions) do + add_index([:consumer_version_id], name: "latest_pp_ids_for_cons_ver_con_ver_id_ndx") + end + end + + down do + alter_table(:latest_pact_publication_ids_for_consumer_versions) do + drop_index([:consumer_version_id], name: "latest_pp_ids_for_cons_ver_con_ver_id_ndx") + end + end +end