smolnar82 commented on code in PR #1146:
URL: https://github.com/apache/knox/pull/1146#discussion_r2809239183
##########
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/TokenStateDatabase.java:
##########
@@ -60,11 +66,20 @@ public class TokenStateDatabase {
private final DataSource dataSource;
+ private static final String POSTGRES_DUPLICATE_OBJECT_STATE = "42710";
+
TokenStateDatabase(DataSource dataSource, String dbType) throws Exception {
this.dataSource = dataSource;
DatabaseType databaseType = DatabaseType.fromString(dbType);
- createTableIfNotExists(TOKENS_TABLE_NAME, databaseType.tokensTableSql());
- createTableIfNotExists(TOKEN_METADATA_TABLE_NAME,
databaseType.metadataTableSql());
+ try {
+ createTableIfNotExists(TOKENS_TABLE_NAME, databaseType.tokensTableSql());
Review Comment:
The problem is that not all the supported DB vendors have `CREATE TALE IF
EXISTS` support (or at least this was true a couple years ago).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]