-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add indexes to webhook_executions and triggered_webhooks tables
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require_relative 'migration_helper' | ||
|
||
include PactBroker::MigrationHelper | ||
|
||
Sequel.migration do | ||
change do | ||
alter_table(:webhook_executions) do | ||
add_index([:triggered_webhook_id], name: "webhook_executions_triggered_webhook_id_index") | ||
end | ||
|
||
alter_table(:triggered_webhooks) do | ||
add_index([:webhook_id], name: "triggered_webhooks_webhook_id_index") | ||
add_index([:consumer_id], name: "triggered_webhooks_consumer_id_index") | ||
add_index([:provider_id], name: "triggered_webhooks_provider_id_index") | ||
add_index([:pact_publication_id], name: "triggered_webhooks_pact_publication_id_index") | ||
add_index([:verification_id], name: "triggered_webhooks_verification_id_index") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters