0

I have a table in Magento1.9 named monitoring in Magento2.0 this table is modified and the table name become monitoring_base with some of the table column renamed, how can I map this table with modified table name and column name ?

monitoring            monitoring_base
----------            ---------------
id                    monitoring_id
status          =>    state
record_date           created_at
0

See the following dev doc: https://devdocs.magento.com/guides/v2.3/migration/extend-the-tool.html

But in short, within your map.xml you want to

  • Use a rename document_rule node to change the table name
  • Add a move field_rule node to mape the fields
<source>
    <document_rules>
        <rename>
            <document>monitoring</document>
            <to>monitoring_base</to>
        </rename>
    </document_rules>
    <field_rules>
        <move>
            <field>monitoring.id</field>
            <to>monitoring_base.monitoring_id</to>
        </move>
        <move>
            <field>monitoring.status</field>
            <to>monitoring_base.state</to>
        </move>
        <move>
            <field>monitoring.record_date</field>
            <to>monitoring_base.created_at</to>
        </move>
    </field_rules>
</source>

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.