From e43982071de7bfac46dc363f8f79c0b0b9d9f396 Mon Sep 17 00:00:00 2001 From: Francesco Carlucci Date: Tue, 17 Oct 2023 14:18:05 +0200 Subject: [PATCH 1/2] moved aws profile to dev config --- config/application.properties | 1 + src/main/resources/application.properties | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.properties b/config/application.properties index 8b13789..4bc1109 100644 --- a/config/application.properties +++ b/config/application.properties @@ -1 +1,2 @@ +aws.profile=default diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 62d84c4..9b14208 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,7 +4,6 @@ management.endpoint.health.show-details=always # Disable auto cloud formation cloud.aws.stack.auto=false -aws.profile=default aws.region=${AWS_REGION:us-east-1} aws.sqs-endpoint=${AWS_SQS_ENDPOINT:http://localhost:4566/000000000000/} aws.internal-queue-name=local-internal-signal-hub From 5b469d6792f7760fc4e93fffcb9caf92f45fbf5f Mon Sep 17 00:00:00 2001 From: Francesco Carlucci Date: Tue, 17 Oct 2023 14:41:42 +0200 Subject: [PATCH 2/2] add conditional creation on indexes --- .../db/changelog/changes/init_table/init_table.sql | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/resources/db/changelog/changes/init_table/init_table.sql b/src/main/resources/db/changelog/changes/init_table/init_table.sql index 5ee5d32..3f5359a 100644 --- a/src/main/resources/db/changelog/changes/init_table/init_table.sql +++ b/src/main/resources/db/changelog/changes/init_table/init_table.sql @@ -8,8 +8,9 @@ CREATE TABLE IF NOT EXISTS ESERVICE ( UNIQUE (eservice_id, producer_id), PRIMARY KEY (eservice_id, producer_id) ); -CREATE INDEX ESERVICE_INDEX_ID ON ESERVICE USING hash (eservice_id); -CREATE INDEX ESERVICE_INDEX_PRODUCER_ID ON ESERVICE USING hash (producer_id); + +CREATE INDEX IF NOT EXISTS ESERVICE_INDEX_ID ON ESERVICE USING hash (eservice_id); +CREATE INDEX IF NOT EXISTS ESERVICE_INDEX_PRODUCER_ID ON ESERVICE USING hash (producer_id); CREATE TABLE IF NOT EXISTS CONSUMER_ESERVICE ( @@ -22,8 +23,8 @@ CREATE TABLE IF NOT EXISTS CONSUMER_ESERVICE ( UNIQUE (eservice_id, consumer_id), PRIMARY KEY (eservice_id, consumer_id) ); -CREATE INDEX CONSUMER_ESERVICE_INDEX_ID ON CONSUMER_ESERVICE USING hash (eservice_id); -CREATE INDEX ESERVICE_INDEX_CONSUMER_ID ON CONSUMER_ESERVICE USING hash (consumer_id); +CREATE INDEX IF NOT EXISTS CONSUMER_ESERVICE_INDEX_ID ON CONSUMER_ESERVICE USING hash (eservice_id); +CREATE INDEX IF NOT EXISTS ESERVICE_INDEX_CONSUMER_ID ON CONSUMER_ESERVICE USING hash (consumer_id); CREATE TABLE IF NOT EXISTS SIGNAL ( @@ -37,8 +38,8 @@ CREATE TABLE IF NOT EXISTS SIGNAL ( tmst_insert TIMESTAMP NOT NULL, UNIQUE (signal_id, eservice_id) ); -CREATE INDEX SIGNAL_INDEX_SIGNAL_ID ON SIGNAL USING hash (signal_id); -CREATE INDEX SIGNAL_INDEX_ESERVICE_ID ON SIGNAL USING hash (eservice_id); +CREATE INDEX IF NOT EXISTS SIGNAL_INDEX_SIGNAL_ID ON SIGNAL USING hash (signal_id); +CREATE INDEX IF NOT EXISTS SIGNAL_INDEX_ESERVICE_ID ON SIGNAL USING hash (eservice_id); CREATE TABLE IF NOT EXISTS DEAD_SIGNAL (