I want to change the length of action_operator field to 50 character in catalogrule_product table

<column xsi:type="varchar" name="action_operator" nullable="true" length="10" default="to_fixed"
                comment="Action Operator"/>

how to override the db_schema.xml Please help

1 Answer 1


You change that Field length from Custom module.

Create db_schema.xml at your module and add below code:

<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <table name="catalogrule_product" resource="default" >
<column xsi:type="varchar" name="action_operator" nullable="true" length="50" default="to_fixed"
                comment="Action Operator"/>

And your module should depend on Magento_CatalogRule

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    <module name="{VendorName_ModuleName}">
            <module name="Magento_CatalogRule"/>
  • 1
    I guess, length should be 50 according to the question
    – HelgeB
    Jul 24, 2020 at 8:44
  • thanks.. for notify. Typo mistake
    – Amit Bera
    Jul 24, 2020 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.