0

people. I'm trying to migrate to declarative schema on my module with magento v2.3.1. But when i'm running php bin/magento setup:install --convert-old-scripts=1 it doesn't generates any db_schema.xml. What i'm doing wrong?

4

Try to remove your module from setup_module table and rerun the command.

As far as I understand, Magento analyzes DDL commands called during setup:upgrade to generate the schema.

In your case, I assume, the legacy install scripts are not being executed.

2

In order to migrate your install and upgrade schema of already installed module to db_schema.xml follow below steps

  • Remove your module entry from setup_module table
  • Drop all your module tables as mentioned in your install and upgrade schema
  • Execute php bin/magento setup:upgrade --convert-old-scripts=1

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.