문제

I just try to override db_schema.xml file of a core customer module into my custom module , but there is no success.

I need to remove a constraint defined in customer db_schema.xml file, how may I do that.

Thanks

도움이 되었습니까?

해결책

After setting disabled="true" to the constraint, run generate whitelist command and upgrade.

<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="customer_entity">    
        <constraint xsi:type="unique" referenceId="CUSTOMER_ENTITY_EMAIL_WEBSITE_ID" disabled="true" />        
    </table>
</schema>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top