1

I have installed fresh Magento 2.2.6 and i have installed two custom modules.

Then i have upgraded the Magento Version to 2.3.1 now i am trying to generate db_schema file for those module using below command.

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

Error:

[Symfony\Component\Console\Exception\RuntimeException]

The "--convert-old-scripts" option does not exist.

  • Will those modules have scripts that is InstallSchema – Prathap Gunasekaran Apr 4 at 11:08
  • 1 has InsallSchema,UpgradeSchema, another has only UpgradeData – Ashish Viradiya Apr 4 at 11:25
1

Run the below command

php bin/magento setup:install --convert_old_scripts=1

Instead of

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

For more information. Look at this

Guess this would be issue for your case.

EDIT :

Run this command in your root to check the available options there

php bin/magento setup:install -h

then you'll probably will get this

--convert-old-scripts[=CONVERT-OLD-SCRIPTS]

so run accordingly of whatever available for your version.

  • I have checked with fresh 2.3.1 setup the option convert-old-scripts is displaying but in the upgraded setup there are no convert-old-scripts found. – Ashish Viradiya Apr 5 at 6:04
  • 1
    Guess the schema already been installed, try fresh magento with uninstalled modules on app/code @AshishViradiya – Prathap Gunasekaran Apr 5 at 6:07
0

In order to generate db_schema.xml file for already installed modules follow below link

https://magento.stackexchange.com/a/273981/43981

  • Yes the answer is right but the command is not working after upgrade magento version. – Ashish Viradiya May 10 at 14:35

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.