Skip to content

Commit 3836c4f

Browse files
EFRS-1286: Removed not null constraints from the liquibase changelogs
1 parent 4d40473 commit 3836c4f

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

java/admin/src/main/java/com/exadel/frs/system/security/CustomJdbcTokenStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public class CustomJdbcTokenStore extends JdbcTokenStore {
2222

2323
private static final String INSERT_ACCESS_TOKEN_WITH_EXPIRATION_SQL = "insert into oauth_access_token (token_id, token, authentication_id, user_name, client_id, authentication, refresh_token, expiration) values (?, ?, ?, ?, ?, ?, ?,?)";
2424
private static final String INSERT_REFRESH_TOKEN_WITH_EXPIRATION_SQL = "insert into oauth_refresh_token (token_id, token, authentication, expiration) values (?, ?, ?, ?)";
25-
private static final String REMOVE_EXPIRED_ACCESS_TOKENS_SQL = "delete from oauth_access_token where expiration < ?";
26-
private static final String REMOVE_EXPIRED_REFRESH_TOKENS_SQL = "delete from oauth_refresh_token where expiration < ?";
25+
private static final String REMOVE_EXPIRED_ACCESS_TOKENS_SQL = "delete from oauth_access_token where expiration is null or expiration < ?";
26+
private static final String REMOVE_EXPIRED_REFRESH_TOKENS_SQL = "delete from oauth_refresh_token where expiration is null or expiration < ?";
2727

2828
private final JdbcTemplate jdbcTemplate;
2929
private final AuthenticationKeyGenerator authenticationKeyGenerator;

java/admin/src/main/resources/db/changelog/db.changelog-0.2.4.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,3 @@ databaseChangeLog:
1515
- column:
1616
name: expiration
1717
type: timestamp
18-
19-
- addNotNullConstraint:
20-
tableName: oauth_access_token
21-
columnName: expiration
22-
- addNotNullConstraint:
23-
tableName: oauth_refresh_token
24-
columnName: expiration

java/api/src/test/resources/db/changelog/db.changelog-0.2.4.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,3 @@ databaseChangeLog:
1515
- column:
1616
name: expiration
1717
type: timestamp
18-
19-
- addNotNullConstraint:
20-
tableName: oauth_access_token
21-
columnName: expiration
22-
- addNotNullConstraint:
23-
tableName: oauth_refresh_token
24-
columnName: expiration

0 commit comments

Comments
 (0)