Migration from 7.1 to 7.2 database issue with entity extending User

Hi, I am trying to migrate from 7.1.9 to latest 7.2.19 release, but am facing the following error when launching the app:

18:15:07.049 ERROR c.h.c.s.a.AuthenticationManagerBean     - Exception is thrown by authentication provider
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.19-cuba): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: column "group_names" does not exist

Position: 118
Error Code: 0
Call: SELECT ID, DTYPE, ACTIVE, CHANGE_PASSWORD_AT_LOGON, CREATE_TS, CREATED_BY, DELETE_TS, DELETED_BY, EMAIL, FIRST_NAME, GROUP_NAMES, IP_MASK, LANGUAGE_, LAST_NAME, LOGIN, LOGIN_LC, MIDDLE_NAME, NAME, PASSWORD, PASSWORD_ENCRYPTION, POSITION_, SYS_TENANT_ID, TIME_ZONE, TIME_ZONE_AUTO, UPDATE_TS, UPDATED_BY, VERSION, GROUP_ID FROM SEC_USER WHERE (((LOGIN_LC = ?) AND ((ACTIVE = ?) OR (ACTIVE IS NULL))) AND ((DELETE_TS IS NULL) AND (DTYPE = ?)))
	bind => [anonymous, true, kyuka_ExtUser]
Query: ReadAllQuery(referenceClass=ExtUser sql="SELECT ID, DTYPE, ACTIVE, CHANGE_PASSWORD_AT_LOGON, CREATE_TS, CREATED_BY, DELETE_TS, DELETED_BY, EMAIL, FIRST_NAME, GROUP_NAMES, IP_MASK, LANGUAGE_, LAST_NAME, LOGIN, LOGIN_LC, MIDDLE_NAME, NAME, PASSWORD, PASSWORD_ENCRYPTION, POSITION_, SYS_TENANT_ID, TIME_ZONE, TIME_ZONE_AUTO, UPDATE_TS, UPDATED_BY, VERSION, GROUP_ID FROM SEC_USER WHERE (((LOGIN_LC = ?) AND ((ACTIVE = ?) OR (ACTIVE IS NULL))) AND ((DELETE_TS IS NULL) AND (DTYPE = ?)))")

The entity causing the error kyuka_ExtUser is extending the security user entity.
Should I add GROUP_NAMES manually?

Answering myself.
The issue had nothing to do with my entity extending SEC_USER.

Adding the following table columns manually in the database solved the issue - my guess is that for some reason they were not created during the migration process as expected for some reason.

SEC_USER
group_names
sys_tenant_id

SEC_ROLE
security_scope
sys_tenant_id

SEC_GROUP
sys_tenant_id

1 Like

I faced the same problem (along with few others.) Should there be more graceful way to do this? I ended up doing all of below to get server started -

alter table SEC_USER add column group_names varchar;  
alter table SEC_USER add column sys_tenant_id varchar;  
alter table SEC_ROLE add column security_scope varchar;  
alter table SEC_ROLE add column sys_tenant_id varchar;  
alter table SEC_GROUP add column sys_tenant_id varchar;  
alter table SEC_USER_ROLE add column role_name varchar;
alter table SEC_CONSTRAINT add column sys_tenant_id varchar;
alter table SEC_SESSION_ATTR add column sys_tenant_id varchar;

Besides I do not know if this will cause any trouble in the future. Any thoughts?