diff --git a/orcid-persistence/src/main/resources/db-master.xml b/orcid-persistence/src/main/resources/db-master.xml index a4a3b726fd..2d893fead1 100644 --- a/orcid-persistence/src/main/resources/db-master.xml +++ b/orcid-persistence/src/main/resources/db-master.xml @@ -406,4 +406,5 @@ + \ No newline at end of file diff --git a/orcid-persistence/src/main/resources/db/updates/add_public_api_daily_rate_limit_indexes.xml b/orcid-persistence/src/main/resources/db/updates/add_public_api_daily_rate_limit_indexes.xml new file mode 100644 index 0000000000..bc25ce9320 --- /dev/null +++ b/orcid-persistence/src/main/resources/db/updates/add_public_api_daily_rate_limit_indexes.xml @@ -0,0 +1,18 @@ + + + + create index concurrently if not exists idx_ip_address on public_api_daily_rate_limit(ip_address); + + + create index concurrently if not exists idx_client_id on public_api_daily_rate_limit(client_id); + + + create index concurrently if not exists idx_request_date on public_api_daily_rate_limit(request_date); + + + create index concurrently if not exists idx_client_ip_date on public_api_daily_rate_limit(client_id, ip_address, request_date); + + +