From 69b43e66d75e85ccdea42d6007a202d82580ea15 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Thu, 31 Oct 2024 09:12:02 +0100 Subject: [PATCH] Fix #1727: Liquibase on Oracle throws "index already exists" error --- doc-private/Developer-How-To-Start.md | 6 +++--- .../powerauth-webflow/1.4.x/20230324-init-db.xml | 12 +----------- .../powerauth-webflow/db.changelog-module.xml | 3 +++ docs/sql/oracle/create_schema.sql | 1 - docs/sql/postgresql/create_schema.sql | 1 - 5 files changed, 7 insertions(+), 16 deletions(-) diff --git a/doc-private/Developer-How-To-Start.md b/doc-private/Developer-How-To-Start.md index 0baadda44..6ba2f67db 100644 --- a/doc-private/Developer-How-To-Start.md +++ b/doc-private/Developer-How-To-Start.md @@ -19,7 +19,7 @@ Important and fixed parameter is `changelog-file`. Others (like URL, username, password) depend on your environment. ```shell -liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-webflow/db.changelog-module.xml --url=jdbc:postgresql://localhost:5432/powerauth --username=powerauth --hub-mode=off status +liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-webflow/db.changelog-module.xml --url=jdbc:postgresql://localhost:5432/powerauth --username=powerauth status ``` @@ -41,7 +41,7 @@ Important and fixed parameter is `changelog-file`. Others (like URL, username, password) depend on your environment. ```shell -liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-tpp-engine/db.changelog-module.xml --url=jdbc:postgresql://localhost:5432/powerauth --username=powerauth --hub-mode=off status +liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-tpp-engine/db.changelog-module.xml --url=jdbc:postgresql://localhost:5432/powerauth --username=powerauth status ``` @@ -63,7 +63,7 @@ Important and fixed parameter is `changelog-file`. Others (like URL, username, password) depend on your environment. ```shell -liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-nextstep/db.changelog-module.xml --url=jdbc:postgresql://localhost:5432/powerauth --username=powerauth --hub-mode=off status +liquibase --changelog-file=./docs/db/changelog/changesets/powerauth-nextstep/db.changelog-module.xml --url=jdbc:postgresql://localhost:5432/powerauth --username=powerauth status ``` When all user identities are stored in Next Step, add foreign keys for user identity manually (they are not part of liquibase changesets). diff --git a/docs/db/changelog/changesets/powerauth-webflow/1.4.x/20230324-init-db.xml b/docs/db/changelog/changesets/powerauth-webflow/1.4.x/20230324-init-db.xml index c23b37a17..9d8489492 100644 --- a/docs/db/changelog/changesets/powerauth-webflow/1.4.x/20230324-init-db.xml +++ b/docs/db/changelog/changesets/powerauth-webflow/1.4.x/20230324-init-db.xml @@ -101,17 +101,7 @@ - - - - - - - Create a new index wf_certificate_verification(operation_id) - - - - + diff --git a/docs/db/changelog/changesets/powerauth-webflow/db.changelog-module.xml b/docs/db/changelog/changesets/powerauth-webflow/db.changelog-module.xml index 9a93b8d98..9599a2fe8 100644 --- a/docs/db/changelog/changesets/powerauth-webflow/db.changelog-module.xml +++ b/docs/db/changelog/changesets/powerauth-webflow/db.changelog-module.xml @@ -7,6 +7,9 @@ + + + diff --git a/docs/sql/oracle/create_schema.sql b/docs/sql/oracle/create_schema.sql index 5b950cfe6..f82079e84 100644 --- a/docs/sql/oracle/create_schema.sql +++ b/docs/sql/oracle/create_schema.sql @@ -628,7 +628,6 @@ CREATE INDEX wf_operation_hash ON wf_operation_session (operation_hash); CREATE INDEX wf_websocket_session ON wf_operation_session (websocket_session_id); CREATE INDEX ns_operation_pending ON ns_operation (user_id, result); CREATE UNIQUE INDEX ns_operation_afs_unique on ns_operation_afs (operation_id, request_afs_action, request_step_index); -CREATE INDEX wf_certificate_operation ON wf_certificate_verification (operation_id); CREATE UNIQUE INDEX ns_application_name ON ns_application (name); CREATE UNIQUE INDEX ns_credential_policy_name ON ns_credential_policy (name); CREATE UNIQUE INDEX ns_otp_policy_name ON ns_otp_policy (name); diff --git a/docs/sql/postgresql/create_schema.sql b/docs/sql/postgresql/create_schema.sql index 866f4b9bc..ce18b9a97 100644 --- a/docs/sql/postgresql/create_schema.sql +++ b/docs/sql/postgresql/create_schema.sql @@ -624,7 +624,6 @@ CREATE INDEX wf_operation_hash ON wf_operation_session (operation_hash); CREATE INDEX wf_websocket_session ON wf_operation_session (websocket_session_id); CREATE INDEX ns_operation_pending ON ns_operation (user_id, result); CREATE UNIQUE INDEX ns_operation_afs_unique ON ns_operation_afs (operation_id, request_afs_action, request_step_index); -CREATE INDEX wf_certificate_operation ON wf_certificate_verification (operation_id); CREATE UNIQUE INDEX ns_application_name ON ns_application (name); CREATE UNIQUE INDEX ns_credential_policy_name ON ns_credential_policy (name); CREATE UNIQUE INDEX ns_otp_policy_name ON ns_otp_policy (name);