Skip to content

Commit

Permalink
Adjust database name to match changed module name
Browse files Browse the repository at this point in the history
  • Loading branch information
dcrossleyau committed Sep 6, 2017
1 parent f6277a5 commit d29cbd0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions destroy-demo-db.sh
Expand Up @@ -8,9 +8,9 @@ executing_password=${5:-}

cd database-setup

./destroy-db.sh loan_demo demo_tenant_circulation_storage loan_demo_admin ${host} ${port} ${executing_user} ${executing_password}
./destroy-db.sh loan_demo demo_tenant_mod_circulation_storage loan_demo_admin ${host} ${port} ${executing_user} ${executing_password}

# Drop the tenant based role as well, because deactivation no longer calls the Tenant API
./drop-role.sh demo_tenant_circulation_storage
./drop-role.sh demo_tenant_mod_circulation_storage

cd ..
4 changes: 2 additions & 2 deletions destroy-test-db.sh
Expand Up @@ -7,8 +7,8 @@ executing_password=${4:-}

cd database-setup

./destroy-db.sh loan_test test_tenant_circulation_storage loan_test_admin ${host} ${port} ${executing_user} ${executing_password}
./destroy-db.sh loan_test test_tenant_mod_circulation_storage loan_test_admin ${host} ${port} ${executing_user} ${executing_password}

./drop-role.sh test_tenant_circulation_storage
./drop-role.sh test_tenant_mod_circulation_storage

cd ..
2 changes: 1 addition & 1 deletion src/main/java/org/folio/rest/impl/LoanPoliciesAPI.java
Expand Up @@ -45,7 +45,7 @@ public void deleteLoanPolicyStorageLoanPolicies(
vertxContext.owner(), TenantTool.calculateTenantId(tenantId));

postgresClient.mutate(String.format("TRUNCATE TABLE %s_%s.%s",
tenantId, "circulation_storage", LOAN_POLICY_TABLE),
tenantId, "mod_circulation_storage", LOAN_POLICY_TABLE),
reply -> {
asyncResultHandler.handle(io.vertx.core.Future.succeededFuture(
LoanPolicyStorageResource.DeleteLoanPolicyStorageLoanPoliciesResponse
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/rest/impl/LoansAPI.java
Expand Up @@ -52,7 +52,7 @@ public void deleteLoanStorageLoans(
vertxContext.owner(), TenantTool.calculateTenantId(tenantId));

postgresClient.mutate(String.format("TRUNCATE TABLE %s_%s.loan",
tenantId, "circulation_storage"),
tenantId, "mod_circulation_storage"),
reply -> {
asyncResultHandler.handle(io.vertx.core.Future.succeededFuture(
LoanStorageResource.DeleteLoanStorageLoansResponse
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/rest/impl/RequestsAPI.java
Expand Up @@ -44,7 +44,7 @@ public void deleteRequestStorageRequests(
vertxContext.owner(), TenantTool.calculateTenantId(tenantId));

postgresClient.mutate(String.format("TRUNCATE TABLE %s_%s.%s",
tenantId, "circulation_storage", REQUEST_TABLE),
tenantId, "mod_circulation_storage", REQUEST_TABLE),
reply -> {
asyncResultHandler.handle(io.vertx.core.Future.succeededFuture(
DeleteRequestStorageRequestsResponse.withNoContent()));
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/folio/rest/api/StorageTestSuite.java
Expand Up @@ -167,7 +167,7 @@ private static ResultSet getRecordsWithUnmatchedIds(String tenantId,

String sql = String.format("SELECT null FROM %s_%s.%s" +
" WHERE CAST(_id AS VARCHAR(50)) != jsonb->>'id'",
tenantId, "circulation_storage", tableName);
tenantId, "mod_circulation_storage", tableName);

dbClient.select(sql, result -> {
if(result.succeeded()) {
Expand Down

0 comments on commit d29cbd0

Please sign in to comment.