From faf65bdb012af5055b998eeb974d6a1c65edb0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20=C4=8Cern=C3=BD?= Date: Thu, 25 Jan 2024 23:14:44 +0100 Subject: [PATCH] Fix #1555: create_schema.sql in 1.6.0 branch is not valid --- docs/sql/oracle/create_schema.sql | 3 ++- docs/sql/postgresql/create_schema.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/sql/oracle/create_schema.sql b/docs/sql/oracle/create_schema.sql index 1ca16138a..6ceb89329 100644 --- a/docs/sql/oracle/create_schema.sql +++ b/docs/sql/oracle/create_schema.sql @@ -76,6 +76,8 @@ CREATE TABLE oauth2_registered_client ( PRIMARY KEY (id) ); +CREATE UNIQUE INDEX oauth2_client_unique ON oauth2_registered_client (client_id); + -- Table oauth2_registered_client stores information about OAuth 2.1 consents -- Source: https://github.com/spring-projects/spring-authorization-server/blob/main/oauth2-authorization-server/src/main/resources/org/springframework/security/oauth2/server/authorization/oauth2-authorization-consent-schema.sql CREATE TABLE oauth2_authorization_consent ( @@ -628,7 +630,6 @@ 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 oauth2_client_unique ON oauth2_registered_client (client_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 63163cc70..866f4b9bc 100644 --- a/docs/sql/postgresql/create_schema.sql +++ b/docs/sql/postgresql/create_schema.sql @@ -76,6 +76,8 @@ CREATE TABLE oauth2_registered_client ( PRIMARY KEY (id) ); +CREATE UNIQUE INDEX oauth2_client_unique ON oauth2_registered_client (client_id); + -- Table oauth2_registered_client stores information about OAuth 2.1 consents -- Source: https://github.com/spring-projects/spring-authorization-server/blob/main/oauth2-authorization-server/src/main/resources/org/springframework/security/oauth2/server/authorization/oauth2-authorization-consent-schema.sql CREATE TABLE oauth2_authorization_consent ( @@ -623,7 +625,6 @@ 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 oauth2_client_unique ON oauth2_registered_client (client_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);