Skip to main content
Tweeted twitter.com/StackMagento/status/1519239946493734913
added 1 character in body; edited tags
Source Link
Rafael Corrêa Gomes
  • 13.7k
  • 14
  • 91
  • 181

Convert How to convert install/upgrade schema scripts to db_schema.xml files on Magento 2.3.1?

I'm following the guide from Magento devdoc about the Declarative Schema: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/migration-commands.htmlMagento DevDocs about the Declarative Schema

I created a new module with old setup way (InstallSchema.php, InstallData.php) to test the convert install/upgrade schema scripts to db_schema.xml config. I ran two commands:

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

But, I didn't see the db_schema.xmldb_schema.xml in my custom module. Why the db_schema.xmldb_schema.xml didn't generate in my module?

I also see the note from Magento

The Schema Listener tool listens for schema changes and attempts to change Magento code, so it should not be run in production mode. It is disabled by default.

So, what should I do in my case? My app is in developer mode.

Convert install/upgrade schema scripts to db_schema.xml files on Magento 2.3.1?

I'm following the guide from Magento devdoc about the Declarative Schema: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/migration-commands.html

I created a new module with old setup way (InstallSchema.php, InstallData.php) to test the convert install/upgrade schema scripts to db_schema.xml config. I ran two commands:

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

But, I didn't see the db_schema.xml in my custom module. Why the db_schema.xml didn't generate in my module?

I also see the note from Magento

The Schema Listener tool listens for schema changes and attempts to change Magento code, so it should not be run in production mode. It is disabled by default.

So, what should I do in my case? My app is in developer mode.

How to convert install/upgrade schema scripts to db_schema.xml files?

I'm following the guide from Magento DevDocs about the Declarative Schema

I created a new module with old setup way (InstallSchema.php, InstallData.php) to test the convert install/upgrade schema scripts to db_schema.xml config. I ran two commands:

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

But, I didn't see the db_schema.xml in my custom module. Why the db_schema.xml didn't generate in my module?

I also see the note from Magento

The Schema Listener tool listens for schema changes and attempts to change Magento code, so it should not be run in production mode. It is disabled by default.

So, what should I do in my case? My app is in developer mode.

Source Link
Khoa TruongDinh
  • 32.3k
  • 11
  • 90
  • 156

Convert install/upgrade schema scripts to db_schema.xml files on Magento 2.3.1?

I'm following the guide from Magento devdoc about the Declarative Schema: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/migration-commands.html

I created a new module with old setup way (InstallSchema.php, InstallData.php) to test the convert install/upgrade schema scripts to db_schema.xml config. I ran two commands:

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

But, I didn't see the db_schema.xml in my custom module. Why the db_schema.xml didn't generate in my module?

I also see the note from Magento

The Schema Listener tool listens for schema changes and attempts to change Magento code, so it should not be run in production mode. It is disabled by default.

So, what should I do in my case? My app is in developer mode.