parent
0afc4a8af7
commit
fa947a41ea
2 changed files with 7 additions and 1 deletions
|
@ -65,7 +65,8 @@ import static org.keycloak.models.map.storage.jpa.JpaMapStorageProviderFactory.C
|
|||
@Entity
|
||||
@Table(name = "kc_user",
|
||||
uniqueConstraints = {
|
||||
@UniqueConstraint(columnNames = {"realmId", "username"}),
|
||||
// if same username it can differ only in usernameWithCase
|
||||
@UniqueConstraint(columnNames = {"realmId", "username", "usernameWithCase"}),
|
||||
@UniqueConstraint(columnNames = {"realmId", "emailConstraint"})
|
||||
})
|
||||
@TypeDefs({@TypeDef(name = "jsonb", typeClass = JsonbType.class)})
|
||||
|
|
|
@ -34,4 +34,9 @@ limitations under the License.
|
|||
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="keycloak" id="users-14797">
|
||||
<addUniqueConstraint tableName="kc_user" columnNames="realmid, username, usernamewithcase"/>
|
||||
<addUniqueConstraint tableName="kc_user" columnNames="realmid, emailconstraint"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
|
Loading…
Reference in a new issue