0

How to create dbschema.xml from installschema.php

2 Answers 2

1

Steps Taken To Generate the db_schema.xml file Automatically for any extension Example : VendorName_ModuleName -> Delete the Module entry from setup_module table -> Delete all the Related tables Used in your Extension -> After that Run the command on magento root

 - bin/magento setup:install --convert-old-scripts=1
 - bin/magento setup:upgrade --convert-old-scripts=1

The Above command will Generate the db_schema.xml file Under VendorName/ModuleName/etc/Directory

Reference Links : https://devdocs.magento.com/guides/v2.4/extension-dev-guide/declarative-schema/migration-commands.html

0

To Generate the db_schema.xml file Automatically for any extension Example : VendorName_ModuleName

-> Delete the Module entry from setup_module table

-> Delete all the Related tables Used in your Extension

-> After that Run the command on magento root

 - bin/magento setup:install --convert-old-scripts=1
 - bin/magento setup:upgrade --convert-old-scripts=1

The Above command will Generate the db_schema.xml file Under VendorName/ModuleName/etc/ Directory.

Thanks.

2
  • Thanks it worked for me
    – user12
    Mar 26, 2022 at 5:23
  • Great to here from your side.
    – ARJUN
    Mar 26, 2022 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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