Domanda

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

È stato utile?

Soluzione

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>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top