Problem in prodcution while deploying CUBA7

Hi,
I have removed the field country from the customer table, this is what the generator has generated:

alter table CRM_CUSTOMER_ENTITY change column COUNTRY_ID COUNTRY_ID__U10274 varchar(32)^
drop index IDX_CRM_CUSTOMER_ENTITY_ON_COUNTRY on CRM_CUSTOMER_ENTITY ;
alter table CRM_CUSTOMER_ENTITY drop foreign key FK_CRM_CUSTOMER_ENTITY_ON_COUNTRY;

I am getting the error:
Cannot drop index 'IDX_CRM_CUSTOMER_ENTITY_ON_COUNTRY': needed in a foreign key constraint

Is this the correct code to drop this column? As far as i know, drop index should come after drop foreign key and I managed to fix it this way.
Why Cuba generated it like that?

thanks

Hi, @avi.fatal. Sorry for a long answer. Thanks for the bug report. We created the new issue, it will be fixed in the next release.

Workaround: You can disable the ‘Generate DROP statements in separate update scripts’ option in the CUBA settings. CUBA → Settings → Project settings → disable Generate DROP statements in separate update scripts