fix migrations, refresh token

This commit is contained in:
Alexander Buntakov 2021-06-27 10:23:26 +03:00
parent 7366a93808
commit bf53ebf369
11 changed files with 39 additions and 38 deletions

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105011900__create_table__devices
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: devices
- onFail: MARK_RAN
not:
tableExists:
tableName: devices
changes:
- createTable:
tableName: devices

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105052300__create_table__users
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: users
- onFail: MARK_RAN
not:
tableExists:
tableName: users
changes:
- createTable:
tableName: users

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105052310__create_table__user_accounts
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: user_accounts
- onFail: MARK_RAN
not:
tableExists:
tableName: user_accounts
changes:
- createTable:
tableName: user_accounts

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105052331__create_table__devices_users
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: devices_users
- onFail: MARK_RAN
not:
tableExists:
tableName: devices_users
changes:
- createTable:
tableName: devices_users

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105081411__create_table__scopes
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: scopes
- onFail: MARK_RAN
not:
tableExists:
tableName: scopes
changes:
- createTable:
tableName: scopes

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105081431__create_table__scope_groups
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: scope_groups
- onFail: MARK_RAN
not:
tableExists:
tableName: scope_groups
changes:
- createTable:
tableName: scope_groups

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105081531__create_table__users_scopes
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: users_scopes
- onFail: MARK_RAN
not:
tableExists:
tableName: users_scopes
changes:
- createTable:
tableName: users_scopes

View File

@ -36,6 +36,7 @@ class RefreshTokenEntity : AuditableUuidIdEntity() {
@ManyToMany
@JoinTable(
name = "refresh_token_scopes",
schema = SCHEMA,
joinColumns = [JoinColumn(name = "refresh_token_id")],
inverseJoinColumns = [JoinColumn(name = "scope_name")]
)

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105201851__create_table__refresh_tokens
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: refresh_tokens
- onFail: MARK_RAN
not:
tableExists:
tableName: refresh_tokens
changes:
- createTable:
tableName: refresh_tokens

View File

@ -3,10 +3,10 @@ databaseChangeLog:
id: 202105201901__create_table__refresh_token_scopes
author: touchin
preConditions:
onFail: MARK_RAN
not:
tableExists:
tableName: refresh_token_scopes
- onFail: MARK_RAN
not:
tableExists:
tableName: refresh_token_scopes
changes:
- createTable:
tableName: refresh_token_scopes

View File

@ -26,11 +26,11 @@ class SecurityAuditorAware(
Optional.ofNullable(result)
}
.or { Optional.of(UNKNOWN_USER) }
.or { Optional.of(API_USER) }
}
companion object {
const val UNKNOWN_USER = "unknownUser"
const val API_USER = "api"
}
}