Error in database update scripts

I have noticed that when creating entities that make use of embedded entities fails to update or create indexes. I have tested it with PostgreSQL and with HSQL. In the following lines you can see that there are lines that do not end with either “;”.


create unique index IDX_IIS_SUBSIDIARY_UNQ on IIS_COSUBSIDIARY (COMPANY_ID, INTERNAL_CODE) ;
create index IDX_IIS_COSUBSIDIARY_ADDRESS_CITY on IIS_COSUBSIDIARY (ADDRESS_CITY_ID)
create index IDX_IIS_COSUBSIDIARY_ADDRESS_DISTRICT on IIS_COSUBSIDIARY (ADDRESS_DISTRICT_ID)
create index IDX_IIS_COSUBSIDIARY_ADDRESS_REGION on IIS_COSUBSIDIARY (ADDRESS_REGION_ID)
create index IDX_IIS_COSUBSIDIARY_ADDRESS_ZONE on IIS_COSUBSIDIARY (ADDRESS_ZONE_ID);
create index IDX_IIS_COSUBSIDIARY_COMPANY on IIS_COSUBSIDIARY (COMPANY_ID);

I’m doing something wrong?

Regards,

Nelson F.

Hi Nelson,

The problem is that Studio generates scripts incorrectly when embedded entity has several links.

You can modify generated scripts using DB manager in Studio or find them in the modules/core/db/ folder.

Thank you for reporting the problem.

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/STUDIO-3649